prithivMLmods/t5-Flan-Prompt-Enhance
By prithivMLmods · ↓ 8 · ♥ 5 · Updated 2025-02-16
What's in this repo
This page lists the files in prithivMLmods/t5-Flan-Prompt-Enhance, including decoder_model.onnx, decoder_model_bnb4.onnx, decoder_model_fp16.onnx and more.
- 32 ONNX models (.onnx files)
- 41 files, including 32 .onnx, 5 .json, 1 .md, 1 .safetensors, 1 .model
- Last updated 2025-02-16
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/decoder_model.onnx | — | Download |
| onnx/decoder_model_bnb4.onnx | — | Download |
| onnx/decoder_model_fp16.onnx | — | Download |
| onnx/decoder_model_int8.onnx | — | Download |
| onnx/decoder_model_merged.onnx | — | Download |
| onnx/decoder_model_merged_bnb4.onnx | — | Download |
| onnx/decoder_model_merged_fp16.onnx | — | Download |
| onnx/decoder_model_merged_int8.onnx | — | Download |
| onnx/decoder_model_merged_q4.onnx | — | Download |
| onnx/decoder_model_merged_q4f16.onnx | — | Download |
Showing 10 of 32 .onnx files — see the full file list on the right.
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README

t5-Flan-Prompt-Enhance
T5-Flan-Prompt-Enhance is a fine-tuned model based on Flan-T5-Small, specifically designed to enhance prompts, captions, and annotations. This means the model has been further trained to improve the quality, clarity, and richness of textual inputs, making them more detailed and expressive.
Key Features:
- Prompt Expansion – Takes short or vague prompts and enriches them with more context, depth, and specificity.
- Caption Enhancement – Improves captions by adding more descriptive details, making them more informative and engaging.
- Annotation Refinement – Enhances annotations by making them clearer, more structured, and contextually relevant.
Run with Transformers
from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
# Model checkpoint
model_checkpoint = "prithivMLmods/t5-Flan-Prompt-Enhance"
# Tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
# Model
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
enhancer = pipeline('text2text-generation',
model=model,
tokenizer=tokenizer,
repetition_penalty=1.2,
device=0 if device == "cuda" else -1)
max_target_length = 256
prefix = "enhance prompt: "
short_prompt = "three chimneys on the roof, green trees and shrubs in front of the house"
answer = enhancer(prefix + short_prompt, max_length=max_target_length)
final_answer = answer[0]['generated_text']
print(final_answer)
This fine-tuning process allows T5-Flan-Prompt-Enhance to generate high-quality, well-structured, and contextually relevant outputs, which can be particularly useful for tasks such as text generation, content creation, and AI-assisted writing.
Model info
Created: 2025-02-16
Updated: 2025-02-16
View on Hugging Face