Downloads · 30 days
14
17% of all-time downloads
seddiktrk/pegasus-samsum
pegasus-samsum is a summarization model from seddiktrk. Use it when you need a shorter version of a longer text. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
14
17% of all-time downloads
All-time downloads
81
Public
Parameters
571M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/pegasus-cnn_dailymail on SAMSum dataset. It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.6026 | 0.5431 | 500 | 1.4875 |
| 1.4737 | 1.0861 | 1000 | 1.4040 |
| 1.4735 | 1.6292 | 1500 | 1.3839 |
| rouge1 | rouge2 | rougeL | rougeLsum Loss |
|---|---|---|---|
| 0.427614 | 0.200571 | 0.340648 | 0.340738 |
You can use this model with the transformers library for dialogue summarization. Here's an example in Python:
from transformers import pipeline
import torch
device = 0 if torch.cuda.is_available() else -1
pipe = pipeline("summarization",
model="seddiktrk/pegasus-samsum",
device=device)
custom_dialogue = """\
Seddik: Hey, have you tried using PEGASUS for summarization?
John: Yeah, I just started experimenting with it last week!
Seddik: It's pretty powerful, especially for abstractive summaries.
John: I agree! The results are really impressive.
Seddik: I was thinking of using it for my next project. Want to collaborate?
John: Absolutely! We could make some awesome improvements together.
Seddik: Perfect, let's brainstorm ideas this weekend.
John: Sounds like a plan!
"""
# Summarize dialogue
gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 128}
print(pipe(custom_dialogue, **gen_kwargs)[0]["summary_text"])
Example Output
John started using PEG for summarization last week. Seddik is thinking of using it for his next project.
John and Seddik will brainstorm ideas this weekend.