Downloads · 30 days
8
32% of all-time downloads
alansary/bart-freeze-encoder-summarization-cnn-20250723
bart-freeze-encoder-summarization-cnn-20250723 is a machine learning model from alansary. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
--- license: apache-2.0 basemodel: facebook/bart-base tags: - summarization - bart - fine-tuned - freezeencoder - text-generation language: - en datasets: - cnndailymail - xsum pipelinetag: summarization ---
Downloads · 30 days
8
32% of all-time downloads
All-time downloads
25
Public
Parameters
139M
558 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors558 MB · 100%
From the Hugging Face model README
license: apache-2.0
base_model: facebook/bart-base
tags:
- summarization
- bart
- fine-tuned
- freeze_encoder
- text-generation
language:
- en
datasets:
- cnn_dailymail
- xsum
pipeline_tag: summarization
---
# BART Fine-tuned for Summarization (freeze_encoder)
## Model Description
This model is a fine-tuned version of [facebook/bart-base](https://huggingface.co/facebook/bart-base) for summarization tasks using the **freeze_encoder** fine-tuning strategy.
## Training Details
### Training Data
- CNN/DailyMail dataset
- XSum dataset
- Combined training approach with data balancing
### Training Configuration
- **Learning Rate**: 5e-05
- **Batch Size**: 8
- **Epochs**: 3
- **Optimizer**: AdamW
- **Scheduler**: Cosine with warmup
- **Mixed Precision**: True
- **Gradient Checkpointing**: True
### Strategy Details
- **Total Parameters**: 139,420,416
- **Trainable Parameters**: 111,068,928
- **Trainable Ratio**: 79.66%
- **Model Size**: 531.8 MB
- **Training Time**: 27.7 minutes
## Usage
```python
from transformers import BartTokenizer, BartForConditionalGeneration
# Load model and tokenizer
tokenizer = BartTokenizer.from_pretrained("alansary/freeze_encoder-bart-summarization")
model = BartForConditionalGeneration.from_pretrained("alansary/freeze_encoder-bart-summarization")
# Example usage
text = "Your long text to summarize here..."
inputs = tokenizer.encode("summarize: " + text, return_tensors="pt", max_length=512, truncation=True)
# Generate summary
with torch.no_grad():
summary_ids = model.generate(
inputs,
max_length=128,
num_beams=4,
early_stopping=True,
no_repeat_ngram_size=2
)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(summary)
```
## Model Performance
Performance metrics will be updated after evaluation completion.
## Limitations and Bias
This model inherits the limitations and biases present in the base BART model and training datasets. Users should be aware of potential biases in summarization outputs.
## Citation
If you use this model, please cite:
```bibtex
@misc{bart-finetuned-summarization-freeze_encoder,
author = {Your Name},
title = {BART Fine-tuned for Summarization (freeze_encoder)},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/alansary/freeze_encoder-bart-summarization}}
}
```