Summarization
Transformers
Safetensors
English
longt5
text2text-generation
dialogue-summarization
Eval Results (legacy)
Instructions to use tuanhqv123/longt5-meeting-summarization with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tuanhqv123/longt5-meeting-summarization with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="tuanhqv123/longt5-meeting-summarization")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("tuanhqv123/longt5-meeting-summarization") model = AutoModelForSeq2SeqLM.from_pretrained("tuanhqv123/longt5-meeting-summarization", device_map="auto") - Notebooks
- Google Colab
- Kaggle
polish model card + embed training curve
Browse files
README.md
CHANGED
|
@@ -2,58 +2,141 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
- en
|
|
|
|
| 5 |
pipeline_tag: summarization
|
|
|
|
| 6 |
tags:
|
| 7 |
- longt5
|
| 8 |
- summarization
|
| 9 |
- meeting-summarization
|
| 10 |
-
-
|
| 11 |
metrics:
|
| 12 |
- rouge
|
| 13 |
- bertscore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
-
# LongT5 — Meeting Summarization
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|----------|--------|
|
| 26 |
-
| ROUGE-1 | 0.4632 |
|
| 27 |
-
| ROUGE-2 | 0.2446 |
|
| 28 |
-
| ROUGE-L | 0.3970 |
|
| 29 |
-
| test_loss| 2.8342 |
|
| 30 |
-
|
| 31 |
-
Comparison vs previous production model (`full_comparison.json`) — this model (`new_model`) wins on every metric:
|
| 32 |
-
|
| 33 |
-
| metric | old | **new (this)** |
|
| 34 |
-
|--------------|--------|----------------|
|
| 35 |
-
| ROUGE-1 | 0.4645 | **0.4687** |
|
| 36 |
-
| ROUGE-2 | 0.2454 | **0.2500** |
|
| 37 |
-
| ROUGE-L | 0.3991 | **0.4032** |
|
| 38 |
-
| BERTScore-F | 0.8567 | **0.8573** |
|
| 39 |
-
|
| 40 |
-
## Usage
|
| 41 |
|
| 42 |
```python
|
| 43 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 44 |
|
| 45 |
-
repo = "
|
| 46 |
tok = AutoTokenizer.from_pretrained(repo)
|
| 47 |
model = AutoModelForSeq2SeqLM.from_pretrained(repo)
|
| 48 |
|
| 49 |
-
|
| 50 |
-
inputs = tok(
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
```
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
```bash
|
| 58 |
-
hf download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
```
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
pipeline_tag: summarization
|
| 7 |
+
base_model: google/long-t5-tglobal-base
|
| 8 |
tags:
|
| 9 |
- longt5
|
| 10 |
- summarization
|
| 11 |
- meeting-summarization
|
| 12 |
+
- long-context
|
| 13 |
metrics:
|
| 14 |
- rouge
|
| 15 |
- bertscore
|
| 16 |
+
model-index:
|
| 17 |
+
- name: longt5-meeting-summarization
|
| 18 |
+
results:
|
| 19 |
+
- task:
|
| 20 |
+
type: summarization
|
| 21 |
+
name: Meeting Summarization
|
| 22 |
+
metrics:
|
| 23 |
+
- type: rouge
|
| 24 |
+
name: ROUGE-1
|
| 25 |
+
value: 0.4632
|
| 26 |
+
- type: rouge
|
| 27 |
+
name: ROUGE-2
|
| 28 |
+
value: 0.2446
|
| 29 |
+
- type: rouge
|
| 30 |
+
name: ROUGE-L
|
| 31 |
+
value: 0.3970
|
| 32 |
+
- type: bertscore
|
| 33 |
+
name: BERTScore-F1
|
| 34 |
+
value: 0.8573
|
| 35 |
---
|
| 36 |
|
| 37 |
+
# LongT5 — Meeting Summarization
|
| 38 |
|
| 39 |
+
A [LongT5](https://huggingface.co/google/long-t5-tglobal-base) (`tglobal-base`) model fine-tuned to summarize long meeting transcripts into concise abstractive summaries. LongT5's transient-global attention handles very long inputs (up to **16,384 tokens** here), making it well suited for full-meeting transcripts that overflow a standard 512/1024-token encoder.
|
| 40 |
|
| 41 |
+
- **Base model:** `google/long-t5-tglobal-base`
|
| 42 |
+
- **Task:** Abstractive summarization (English meetings/transcripts)
|
| 43 |
+
- **Max input / output:** 16,384 / 512 tokens
|
| 44 |
+
- **License:** Apache-2.0
|
| 45 |
|
| 46 |
+

|
| 47 |
|
| 48 |
+
## Quick start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
```python
|
| 51 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 52 |
|
| 53 |
+
repo = "tuanhqv123/longt5-meeting-summarization"
|
| 54 |
tok = AutoTokenizer.from_pretrained(repo)
|
| 55 |
model = AutoModelForSeq2SeqLM.from_pretrained(repo)
|
| 56 |
|
| 57 |
+
transcript = """...""" # your meeting transcript
|
| 58 |
+
inputs = tok(transcript, return_tensors="pt", truncation=True, max_length=16384)
|
| 59 |
+
summary_ids = model.generate(
|
| 60 |
+
**inputs,
|
| 61 |
+
max_new_tokens=512,
|
| 62 |
+
num_beams=4,
|
| 63 |
+
no_repeat_ngram_size=3,
|
| 64 |
+
length_penalty=1.0,
|
| 65 |
+
)
|
| 66 |
+
print(tok.decode(summary_ids[0], skip_special_tokens=True))
|
| 67 |
```
|
| 68 |
|
| 69 |
+
Download just the weights:
|
| 70 |
|
| 71 |
```bash
|
| 72 |
+
hf download tuanhqv123/longt5-meeting-summarization --local-dir ./best_model
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Evaluation
|
| 76 |
+
|
| 77 |
+
Held-out **test** set (342 examples):
|
| 78 |
+
|
| 79 |
+
| Metric | Score |
|
| 80 |
+
|--------------|--------|
|
| 81 |
+
| ROUGE-1 | 0.4632 |
|
| 82 |
+
| ROUGE-2 | 0.2446 |
|
| 83 |
+
| ROUGE-L | 0.3970 |
|
| 84 |
+
| BERTScore-F1 | 0.8573 |
|
| 85 |
+
| Test loss | 2.8342 |
|
| 86 |
+
|
| 87 |
+
This checkpoint replaces a previous production model and **improves on every metric**:
|
| 88 |
+
|
| 89 |
+
| Metric | Previous | **This model** |
|
| 90 |
+
|--------------|----------|----------------|
|
| 91 |
+
| ROUGE-1 | 0.4645 | **0.4687** |
|
| 92 |
+
| ROUGE-2 | 0.2454 | **0.2500** |
|
| 93 |
+
| ROUGE-L | 0.3991 | **0.4032** |
|
| 94 |
+
| BERTScore-F1 | 0.8567 | **0.8573** |
|
| 95 |
+
|
| 96 |
+
<sub>(comparison run on the same evaluation set with identical generation settings)</sub>
|
| 97 |
+
|
| 98 |
+
## Training
|
| 99 |
+
|
| 100 |
+
| Setting | Value |
|
| 101 |
+
|----------------------|--------------------------------|
|
| 102 |
+
| Base model | `google/long-t5-tglobal-base` |
|
| 103 |
+
| Epochs | 10 (`load_best_model_at_end`, best by ROUGE-L) |
|
| 104 |
+
| Batch size | 1 |
|
| 105 |
+
| Learning rate | 1e-5 |
|
| 106 |
+
| Warmup steps | 100 |
|
| 107 |
+
| Max grad norm | 1.0 |
|
| 108 |
+
| Label smoothing | 0.1 |
|
| 109 |
+
| Precision | BF16 |
|
| 110 |
+
| Max input / output | 16,384 / 512 tokens |
|
| 111 |
+
| Data split | 3,757 train / 427 val / 342 test |
|
| 112 |
+
| Hardware | 1× NVIDIA RTX 4090 |
|
| 113 |
+
| Training time | ~3.7 h |
|
| 114 |
+
|
| 115 |
+
### Validation ROUGE per epoch
|
| 116 |
+
|
| 117 |
+
| Epoch | ROUGE-1 | ROUGE-2 | ROUGE-L |
|
| 118 |
+
|-------|---------|---------|---------|
|
| 119 |
+
| 1 | 0.3660 | 0.1708 | 0.3128 |
|
| 120 |
+
| 3 | 0.4375 | 0.2276 | 0.3764 |
|
| 121 |
+
| 5 | 0.4618 | 0.2444 | 0.3988 |
|
| 122 |
+
| 7 | 0.4706 | 0.2492 | 0.4036 |
|
| 123 |
+
| 9 | 0.4737 | 0.2530 | 0.4068 |
|
| 124 |
+
| **10** | **0.4744** | **0.2545** | **0.4091** |
|
| 125 |
+
|
| 126 |
+
## Intended use & limitations
|
| 127 |
+
|
| 128 |
+
- **Intended:** abstractive summarization of English meeting transcripts / long conversational text.
|
| 129 |
+
- **Limitations:** English-only; trained on meeting-style data so it may transfer poorly to other domains (legal, medical, code). Like all abstractive summarizers it can hallucinate — verify facts before relying on summaries. Inputs beyond 16,384 tokens are truncated.
|
| 130 |
+
|
| 131 |
+
## Citation
|
| 132 |
+
|
| 133 |
+
Built on LongT5:
|
| 134 |
+
|
| 135 |
+
```bibtex
|
| 136 |
+
@article{guo2021longt5,
|
| 137 |
+
title={LongT5: Efficient Text-To-Text Transformer for Long Sequences},
|
| 138 |
+
author={Guo, Mandy and Ainslie, Joshua and Uthus, David and Ontanon, Santiago and Ni, Jianmo and Sung, Yun-Hsuan and Yang, Yinfei},
|
| 139 |
+
journal={arXiv preprint arXiv:2112.07916},
|
| 140 |
+
year={2021}
|
| 141 |
+
}
|
| 142 |
```
|