File size: 2,993 Bytes
d429434 2f6b5af be7fab2 ae5cdae 32a4368 d429434 be7fab2 d429434 1a2b907 d429434 d5f9bf2 d429434 ae5cdae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
---
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
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# pegasus-finetuned-samsum
This model is a fine-tuned version of [google/pegasus-cnn_dailymail](https://huggingface.co/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](https://paperswithcode.com/sota/text-summarization-on-samsum-corpus),
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
```Python
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 |