Downloads · 30 days
11
7% of all-time downloads
yunu919/mbart-large-dialogue-summarization
mbart-large-dialogue-summarization is a summarization model from yunu919. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of facebook/mbart-large-50-many-to-many-mmt for English dialogue summarization.
Downloads · 30 days
11
7% of all-time downloads
All-time downloads
163
Public
Parameters
611M
2.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
From the Hugging Face model README
This model is a fine-tuned version of facebook/mbart-large-50-many-to-many-mmt for English dialogue summarization.
It takes an English multi-speaker dialogue as input and generates an English abstractive summary.
facebook/mbart-large-50-many-to-many-mmtThis model is intended for:
This model is not intended for high-stakes or production use without additional evaluation.
The model was fine-tuned on a JSON-formatted dialogue summarization dataset with the following fields in the raw data:
dialoguesummarysummary_desummary_zhFor this training run, only the following columns were used:
dialogue → source textsummary → target summaryAfter cleaning and filtering, the dataset sizes were:
The following preprocessing steps were applied:
<file_gif> and similar markersen_XXen_XXThe model was trained with the following configuration:
2e-5Adafactorbf16rougeLsumTraining was run on:
Evaluation was performed using ROUGE.
| Metric | Score |
|---|---|
| ROUGE-1 | 50.9603 |
| ROUGE-2 | 26.7346 |
| ROUGE-L | 42.1370 |
| ROUGE-Lsum | 46.6278 |
| Loss | 1.4443 |
| Metric | Score |
|---|---|
| ROUGE-1 | 48.9213 |
| ROUGE-2 | 24.1386 |
| ROUGE-L | 40.3879 |
| ROUGE-Lsum | 44.7998 |
| Loss | 1.4613 |
The model was evaluated using beam search.
For best results, use generation settings close to the evaluation setup:
num_beams=5max_length=64forced_bos_token_id=en_XXfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_name = "yunu919/mbart-large-dialogue-summarization"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
dialogue = """Hannah: Hey, do you have Betty's number?
Amanda: Lemme check
Amanda: Sorry, can't find it.
Amanda: Ask Larry"""
inputs = tokenizer(
dialogue,
return_tensors="pt",
truncation=True,
max_length=768,
)
outputs = model.generate(
**inputs,
num_beams=5,
max_length=64,
forced_bos_token_id=tokenizer.lang_code_to_id["en_XX"],
)
summary = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
print(summary)