Downloads · 30 days
9
17% of all-time downloads
Hiratax/t5-news-summarizer
t5-news-summarizer is a summarization model from Hiratax. Use it when you need a shorter version of a longer text. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/flan-t5-base trained on samples from CNN/DailyMail and XSum. It generates news summaries in three styles: Harsh (Concise), Standard, and Detailed.
Downloads · 30 days
9
17% of all-time downloads
All-time downloads
53
Public
Parameters
248M
991 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors990 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/flan-t5-base trained on samples from CNN/DailyMail and XSum.
It generates news summaries in three styles: Harsh (Concise), Standard, and Detailed.
google/flan-t5-baseThis model supports a Style Prompt that determines summary length and density:
Harsh
Standard
Detailed
from transformers import pipeline
summarizer = pipeline("summarization", model="Hiratax/t5-news-summarizer")
text = """
The James Webb Space Telescope (JWST) has captured a lush landscape of stellar birth.
The new image shows the Cosmic Cliffs, which are the edge of a giant gaseous cavity within the star-forming region NGC 3324.
"""
# 1. Standard
print(summarizer("summarize standard: " + text))
# 2. Harsh (Headline)
print(summarizer("summarize harsh: " + text))
# 3. Detailed
print(summarizer("summarize detailed: " + text))
| Style | Min Length | Max Length | Length Penalty | Repetition Penalty | N-Gram Block |
|---|---|---|---|---|---|
| Harsh | 10 | 35% of input | 1.0 | 2.0 | 3 |
| Standard | 60 | 150 | 2.0 | 1.5 | 3 |
| Detailed | 50% input | 150% of input | 1.5 | 1.2 | 4 |
Tip:
"Detailed" style benefits from no_repeat_ngram_size=4 to avoid repeated openings.
Apache 2.0