avanishd's picture
Update README.md
d5f9bf2 verified
metadata
library_name: transformers
base_model: google/pegasus-cnn_dailymail
tags:
  - generated_from_trainer
datasets:
  - samsum
model-index:
  - name: pegasus-finetuned-samsum
    results:
      - task:
          type: summarization
        dataset:
          name: samsum
          type: samsum
        metrics:
          - name: ROUGE-1
            type: ROUGE-1
            value: 0.44030729209257835
          - name: ROUGE-2
            type: ROUGE-2
            value: 0.21015363722992564
          - name: ROUGE-L
            type: ROUGE-L
            value: 0.3491351151672408
          - name: ROUGE-Lsum
            type: ROUGE-Lsum
            value: 0.3492708872856547
language:
  - en
pipeline_tag: summarization
metrics:
  - rouge

pegasus-finetuned-samsum

This model is a fine-tuned version of google/pegasus-cnn_dailymail on the samsum dataset. It achieves the following results on the evaluation set:

  • Loss: 1.4245
  • Rouge-1: 0.4403
  • Rouge-2: 0.2102
  • Rouge-L: 0.3491
  • Rouge-Lsum: 0.3493

Model description

This would be the 10th best-performing model on the Papers with Code SAMsum leaderboard, as of April 8, 2025.

Intended uses & limitations

This model is designed for abstractive dialogue summarization. It can take in multi-turn conversations and generate concise summaries.

How to Use

from transformers import pipeline

# Load summarization pipeline
model_name = "avanishd/pegasus-finetuned-samsum/"
summarizer = pipeline("summarization", model=model_name, tokenizer=model_name)

# Sample conversation
dialogue = """
John: Hey, are you free tomorrow?
Alice: I think so, why?
John: Want to catch a movie or grab lunch?
Alice: Sure, lunch sounds good. What time?
John: Let's say 1 PM at the new place downtown?
Alice: Works for me!
"""

# Generate summary
summary = summarizer(dialogue, max_length=60, min_length=15, do_sample=False)[0]['summary_text']

print("Summary:", summary)

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 1
  • eval_batch_size: 1
  • seed: 42
  • gradient_accumulation_steps: 16
  • total_train_batch_size: 16
  • optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_steps: 500
  • num_epochs: 1
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Validation Loss
1.5798 0.9992 920 1.4245

Framework versions

  • Transformers 4.50.3
  • Pytorch 2.6.0+cu124
  • Datasets 3.5.0
  • Tokenizers 0.21.1