samandar1105/text-summarizer
026
T5-small Fine-Tuned on CNN/DailyMail
This model generates abstractive summaries of English news articles.
Model Details
- Base model: t5-small
- Dataset: CNN/DailyMail v3.0.0
- Task: Abstractive text summarization
- Framework: PyTorch + HuggingFace Transformers
Performance (ROUGE, on held-out test sample)
How to Use
⚠️ This model requires the "summarize: " prefix on every input, since it's a T5 model.
from transformers import pipeline
summarizer = pipeline("summarization", model="samandar1105/text-summarizer")
text = "summarize: " + "YOUR LONG ARTICLE TEXT HERE"
result = summarizer(text, max_length=80, min_length=20, do_sample=False)
print(result[0]["summary_text"])Training Details
- Learning rate: 3e-5
- Epochs: 4
- Batch size: 8
- Max input length: 512 tokens
- Max target length: 128 tokens
