Model Card for t5_small Summarization Model
Model Details
This model is a fine-tuned version of T5-small for text summarization tasks.
Training Data
The model was trained on the CNN/Daily Mail dataset.
Training Procedure
Fine-tuning the pre-trained T5-small model on the CNN/Daily Mail dataset.
training_args = Seq2SeqTrainingArguments(
output_dir="./results",
eval_strategy="epoch",
learning_rate=2e-5,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
warmup_steps=500,
weight_decay=0.01,
save_total_limit=2,
num_train_epochs=1,
fp16=True,
predict_with_generate=True
)
How to Use
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("repo_name")
tokenizer = AutoTokenizer.from_pretrained("repo_name")
inputs = tokenizer("input text", return_tensors="pt")
outputs = model.generate(**inputs)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
Evaluation
ROUGE, BLEU 'ROUGE-1', 'ROUGE-2', 'ROUGE-L', 'BLEU-1', 'BLEU-2', 'BLEU-4'
Limitations
The model may not perform well on texts.
Ethical Considerations
The model should be used responsibly.