Downloads · 30 days
19
23% of all-time downloads
Mitchins/t5-base-artgen-multi-instruct-ONNX
t5-base-artgen-multi-instruct-ONNX is a text generation model from Mitchins. Use it when you need the model to write or continue text. It is set up for optimum. The card lists the license as apache-2.0.
ONNX version of Mitchins/t5-base-artgen-multi-instruct for optimized CPU inference.
Downloads · 30 days
19
23% of all-time downloads
All-time downloads
84
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.1 GB · 100%
From the Hugging Face model README
ONNX version of Mitchins/t5-base-artgen-multi-instruct for optimized CPU inference.
Enhance this prompt: {text}Enhance this prompt (no lora): {text}Enhance this prompt (with lora): {text}Simplify this prompt: {text}from optimum.onnxruntime import ORTModelForSeq2SeqLM
from transformers import T5Tokenizer
# Load ONNX model
model = ORTModelForSeq2SeqLM.from_pretrained("Mitchins/t5-base-artgen-multi-instruct-ONNX")
tokenizer = T5Tokenizer.from_pretrained("Mitchins/t5-base-artgen-multi-instruct-ONNX")
# Example usage
text = "woman in red dress"
prompt = f"Enhance this prompt (no lora): {text}"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=80)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
Optimized for CPU inference with significant speedup compared to PyTorch on CPU.