Downloads · 30 days
14
25% of all-time downloads
onnx-community/t5-cnn-25k-ONNX
t5-cnn-25k-ONNX is a summarization model from onnx-community. Use it when you need a shorter version of a longer text. It is set up for transformers.js. The card lists the license as apache-2.0.
This is an ONNX version of vaibhavvanshu/t5-cnn-25k. It was automatically converted and uploaded using this Hugging Face Space.
Downloads · 30 days
14
25% of all-time downloads
All-time downloads
57
Public
Repo size
2.1 GB
Likes
0
Public
Click a slice to open those files.
.onnx2.7 GB · 100%
From the Hugging Face model README
This is an ONNX version of vaibhavvanshu/t5-cnn-25k. It was automatically converted and uploaded using this Hugging Face Space.
See the pipeline documentation for summarization: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.SummarizationPipeline
A fine-tuned T5-small model for abstractive text summarization, trained on 25,000 examples from the CNN/DailyMail dataset.
This model is designed to generate concise abstractive summaries from input text.
It is used as the summarization model in the Text Summarizer application, which supports PDF and text document summarization.
google-t5/t5-smallThe model is intended for:
from transformers import T5Tokenizer, T5ForConditionalGeneration
model_name = "vaibhavvanshu/t5-cnn-25k"
tokenizer = T5Tokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)
text = "summarize: Your text goes here."
inputs = tokenizer(
text,
return_tensors="pt",
max_length=512,
truncation=True
)
outputs = model.generate(
**inputs,
max_length=250,
num_beams=4,
early_stopping=True
)
summary = tokenizer.decode(
outputs[0],
skip_special_tokens=True
)
print(summary)
The model was fine-tuned from T5-small using the CNN/DailyMail summarization dataset.
The project contains multiple experiments using different training dataset sizes. This repository contains the 25K training version selected for the final application.
The final application uses hierarchical summarization for longer documents by:
The application supports three output lengths:
| Length | Target Maximum |
|---|---|
| Short | 150 tokens |
| Medium | 250 tokens |
| Long | 400 tokens |
These settings are implemented by the application rather than being separate models.
Like other abstractive summarization models, this model may:
Generated summaries should therefore be reviewed when accuracy is important.
The model was trained using the CNN/DailyMail summarization dataset.
Dataset:
cnn_dailymail
The dataset contains news articles paired with human-written reference summaries.
This model is released under the Apache License 2.0.
The model is a fine-tuned version of T5-small. Users should also review the licenses and terms associated with the base model and training dataset when using the model.
This model is part of the Text Summarizer application, which consists of:
The trained model is hosted on Hugging Face and the application can use this repository for model inference.