Downloads · 30 days
5
22% of all-time downloads
AventIQ-AI/bart-based-text-summarization-for-news-aggregation
bart-based-text-summarization-for-news-aggregation is a machine learning model from AventIQ-AI. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository hosts a BART transformer model fine-tuned for abstractive text summarization of news articles. It is designed to condense lengthy news reports into concise, informative summaries, enhancing user experi…
Downloads · 30 days
5
22% of all-time downloads
All-time downloads
23
Public
Parameters
139M
279 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors279 MB · 99%
From the Hugging Face model README
This repository hosts a BART transformer model fine-tuned for abstractive text summarization of news articles. It is designed to condense lengthy news reports into concise, informative summaries, enhancing user experience for news readers and aggregators.
pip install datasets transformers rouge-score evaluate
from transformers import BartTokenizer, BartForConditionalGeneration, Trainer, TrainingArguments, DataCollatorForSeq2Seq
import torch
# Load tokenizer and model
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model_name = "facebook/bart-base"
tokenizer = BartTokenizer.from_pretrained(model_name)
model = BartForConditionalGeneration.from_pretrained(model_name).to(device)
The dataset is sourced from Hugging Face’s Reddit-TIFU dataset. It contains 79,000 reddit post and their summaries. The original training and testing sets were merged, shuffled, and re-split using an 90/10 ratio.
Post-training quantization was applied using PyTorch's built-in quantization framework to reduce the model size and improve inference efficiency.
.
├── config.json
├── tokenizer_config.json
├── sepcial_tokens_map.json
├── tokenizer.json
├── model.safetensors # Fine Tuned Model
├── README.md # Model documentation
The model may not generalize well to domains outside the fine-tuning dataset.
Quantization may result in minor accuracy degradation compared to full-precision models.
Contributions are welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.