CoolFace
Modelpublic

samandar1105/text-summarizer

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes26downloads
Model Card

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)

MetricScore
ROUGE-136.1
ROUGE-215.36
ROUGE-L26.07

How to Use

⚠️ This model requires the "summarize: " prefix on every input, since it's a T5 model.

python
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