이 모델은 kobart모델을 문서요약, 도서자료요약, 요약문 및 레포트 생성 데이터로 fine-tuning한 모델입니다.
Open-weight model · Summarization
led-base-book-summary
by Peter Szemraj pszemraj/led-base-book-summary
The Longformer Encoder-Decoder (LED) for Narrative-Esque Long Text Summarization is a model I fine-tuned from allenai/led-base-16384 to condense extensive technical, academic, and narrative content in a fairly generalizable way.
Runs On
What it takes to serve led-base-book-summary (162M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 0.3 GB | 0.4 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 0.2 GB | 0.2 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.1 GB | 0.1 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.
Model Card
By Peter Szemraj, published under apache-2.0, revision 842ba9376965.
The Longformer Encoder-Decoder (LED) for Narrative-Esque Long Text Summarization is a model I fine-tuned from allenai/led-base-16384 to condense extensive technical, academic, and narrative content in a fairly generalizable way. - Ideal for summarizing long narratives, articles, papers, textbooks, and other documents. - the sparknotes-esque style leads to 'explanations' in the summarized content, offering insightful output. The model was trained on the BookSum dataset released by SalesForce, which leads to the bsd-3-clause license. The training process involved 16 epochs with parameters tweaked to facilitate very fine-tuning-type training (super low learning rate). This model is the…
Read Peter Szemraj's full model card
LED-Based Summarization Model: Condensing Long and Technical Information
The Longformer Encoder-Decoder (LED) for Narrative-Esque Long Text Summarization is a model I fine-tuned from allenai/led-base-16384 to condense extensive technical, academic, and narrative content in a fairly generalizable way.
Key Features and Use Cases
- Ideal for summarizing long narratives, articles, papers, textbooks, and other documents.
- the sparknotes-esque style leads to 'explanations' in the summarized content, offering insightful output.
- High capacity: Handles up to 16,384 tokens per batch.
- demos: try it out in the notebook linked above or in the demo on Spaces
Note: The API widget has a max length of ~96 tokens due to inference timeout constraints.
Training Details
The model was trained on the BookSum dataset released by SalesForce, which leads to the bsd-3-clause license. The training process involved 16 epochs with parameters tweaked to facilitate very fine-tuning-type training (super low learning rate).
Model checkpoint: pszemraj/led-base-16384-finetuned-booksum.
Other Related Checkpoints
This model is the smallest/fastest booksum-tuned model I have worked on. If you're looking for higher quality summaries, check out:
There are also other variants on other datasets etc on my hf profile, feel free to try them out :)
Basic Usage
I recommend using encoder_no_repeat_ngram_size=3 when calling the pipeline object, as it enhances the summary quality by encouraging the use of new vocabulary and crafting an abstractive summary.
Create the pipeline object:
import torch
from transformers import pipeline
hf_name = "pszemraj/led-base-book-summary"
summarizer = pipeline(
"summarization",
hf_name,
device=0 if torch.cuda.is_available() else -1,
)
Feed the text into the pipeline object:
wall_of_text = "your words here"
result = summarizer(
wall_of_text,
min_length=8,
max_length=256,
no_repeat_ngram_size=3,
encoder_no_repeat_ngram_size=3,
repetition_penalty=3.5,
num_beams=4,
do_sample=False,
early_stopping=True,
)
print(result[0]["generated_text"])
Simplified Usage with TextSum
To streamline the process of using this and other models, I've developed a Python package utility named textsum. This package offers simple interfaces for applying summarization models to text documents of arbitrary length.
Install TextSum:
pip install textsum
Then use it in Python with this model:
from textsum.summarize import Summarizer
model_name = "pszemraj/led-base-book-summary"
summarizer = Summarizer(
model_name_or_path=model_name, # you can use any Seq2Seq model on the Hub
token_batch_length=4096, # how many tokens to batch summarize at a time
)
long_string = "This is a long string of text that will be summarized."
out_str = summarizer.summarize_string(long_string)
print(f"summary: {out_str}")
Currently implemented interfaces include a Python API, a Command-Line Interface (CLI), and a shareable demo/web UI.
For detailed explanations and documentation, check the README or the wiki
Configuration
- Architecture
- LEDForConditionalGeneration
- Layers
- 6
- Vocabulary size
- 50,265
- Stored precision
- float32
- Model type
- led
Identity and Version
- Repository
- pszemraj/led-base-book-summary
- Publisher
- Peter Szemraj
- Task
- Summarization
- Modality
- Text
- Library
- transformers
- Parameters
- 162M parameters
- Languages
- led
- Revision
- 842ba9376965acac7e72cab2161ba21f5830be70
- First published
- 2022-03-02
- Last updated
- 2025-12-29
Files and Weights
14 files, 1.3 GB in total. The weights are 3 files totalling 1.3 GB in bin, safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 647.6 MB | 5a08ab8231e5 |
| pytorch_model.bin | Weights | 647.6 MB | a8c74d469611 |
| training_args.bin | Weights | 4.4 KB | 4b45e019c7ec |
| config.json | Configuration | 1.3 KB | — |
| special_tokens_map.json | Configuration | 772 B | — |
| trainer_state.json | Configuration | 13.7 KB | — |
| README.md | Documentation | 32.4 KB | — |
| evals-outputs/GAUNTLET.md | Documentation | 24.0 KB | — |
| .gitattributes | Repository | 1.2 KB | — |
| .gitignore | Repository | 13 B | — |
| merges.txt | Tokenizer | 456.4 KB | — |
| tokenizer.json | Tokenizer | 2.1 MB | — |
| tokenizer_config.json | Tokenizer | 1.3 KB | — |
| vocab.json | Tokenizer | 798.3 KB | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
- Download size
- 1.3 GB
Released by Peter Szemraj through its official repository on Hugging Face. Read the license.
Built From
- Trained on (disclosed) kmfoda/booksum
Evaluations
Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.
| Benchmark | Conditions | Result | Reported by | Revision | Date |
|---|---|---|---|---|---|
| big_patent | Configuration yTask SummarizationMetric ROUGE-1Comparison conditions not established | 33.7585 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| big_patent | Configuration yTask SummarizationMetric ROUGE-2Comparison conditions not established | 9.4101 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| big_patent | Configuration yTask SummarizationMetric ROUGE-LComparison conditions not established | 18.8927 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| big_patent | Configuration yTask SummarizationMetric ROUGE-LSUMComparison conditions not established | 28.5051 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| big_patent | Configuration yTask SummarizationMetric gen_lenComparison conditions not established | 222.663 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| big_patent | Configuration yTask SummarizationMetric lossComparison conditions not established | 5.16287 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| billsum | Configuration defaultTask SummarizationMetric ROUGE-1Comparison conditions not established | 36.8502 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| billsum | Configuration defaultTask SummarizationMetric ROUGE-2Comparison conditions not established | 15.9147 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| billsum | Configuration defaultTask SummarizationMetric ROUGE-LComparison conditions not established | 23.4762 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| billsum | Configuration defaultTask SummarizationMetric ROUGE-LSUMComparison conditions not established | 30.9597 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| billsum | Configuration defaultTask SummarizationMetric gen_lenComparison conditions not established | 131.362 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| billsum | Configuration defaultTask SummarizationMetric lossComparison conditions not established | 3.87879 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| cnn_dailymail | Configuration 3.0.0Task SummarizationMetric ROUGE-1Comparison conditions not established | 30.5036 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| cnn_dailymail | Configuration 3.0.0Task SummarizationMetric ROUGE-2Comparison conditions not established | 13.2558 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| cnn_dailymail | Configuration 3.0.0Task SummarizationMetric ROUGE-LComparison conditions not established | 19.0284 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| cnn_dailymail | Configuration 3.0.0Task SummarizationMetric ROUGE-LSUMComparison conditions not established | 28.3404 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| cnn_dailymail | Configuration 3.0.0Task SummarizationMetric gen_lenComparison conditions not established | 231.094 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| cnn_dailymail | Configuration 3.0.0Task SummarizationMetric lossComparison conditions not established | 3.94385 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| kmfoda/booksum | Configuration kmfoda--booksumTask SummarizationMetric ROUGE-1Comparison conditions not established | 33.4536 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| kmfoda/booksum | Configuration kmfoda--booksumTask SummarizationMetric ROUGE-2Comparison conditions not established | 5.2232 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| kmfoda/booksum | Configuration kmfoda--booksumTask SummarizationMetric ROUGE-LComparison conditions not established | 16.2044 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| kmfoda/booksum | Configuration kmfoda--booksumTask SummarizationMetric ROUGE-LSUMComparison conditions not established | 29.9765 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| kmfoda/booksum | Configuration kmfoda--booksumTask SummarizationMetric gen_lenComparison conditions not established | 191.978 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| kmfoda/booksum | Configuration kmfoda--booksumTask SummarizationMetric lossComparison conditions not established | 3.19859 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| multi_news | Configuration defaultTask SummarizationMetric ROUGE-1Comparison conditions not established | 38.7332 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| multi_news | Configuration defaultTask SummarizationMetric ROUGE-2Comparison conditions not established | 11.0072 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| multi_news | Configuration defaultTask SummarizationMetric ROUGE-LComparison conditions not established | 18.6018 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| multi_news | Configuration defaultTask SummarizationMetric ROUGE-LSUMComparison conditions not established | 34.5911 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| multi_news | Configuration defaultTask SummarizationMetric gen_lenComparison conditions not established | 192.001 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| multi_news | Configuration defaultTask SummarizationMetric lossComparison conditions not established | 3.57444 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| samsum | Configuration samsumTask SummarizationMetric ROUGE-1Comparison conditions not established | 32 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| samsum | Configuration samsumTask SummarizationMetric ROUGE-2Comparison conditions not established | 10.0781 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| samsum | Configuration samsumTask SummarizationMetric ROUGE-LComparison conditions not established | 23.6331 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| samsum | Configuration samsumTask SummarizationMetric ROUGE-LSUMComparison conditions not established | 28.7831 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| samsum | Configuration samsumTask SummarizationMetric gen_lenComparison conditions not established | 60.7411 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| samsum | Configuration samsumTask SummarizationMetric lossComparison conditions not established | 2.90302 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| xsum | Configuration defaultTask SummarizationMetric ROUGE-1Comparison conditions not established | 16.3186 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| xsum | Configuration defaultTask SummarizationMetric ROUGE-2Comparison conditions not established | 3.0261 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| xsum | Configuration defaultTask SummarizationMetric ROUGE-LComparison conditions not established | 10.4045 | pszemraj Publisher reported |
Evaluated revision not stated | — |
| xsum | Configuration defaultTask SummarizationMetric ROUGE-LSUMComparison conditions not established | 12.612 | pszemraj Publisher reported |
Evaluated revision not stated | — |
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 1.3 GB |
| 16-bit | 0.3 GB |
| 8-bit | 0.2 GB |
| 4-bit | 0.1 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About led-base-book-summary
How much GPU memory does led-base-book-summary need?
About 0.4 GB at 16-bit and 0.1 GB at 4-bit: the weights (162M parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run led-base-book-summary on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use led-base-book-summary commercially?
Yes. led-base-book-summary is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.
Similar Models
Finetuned ai-forever/ruT5-base for text and dialogue summarization. All 'train' subsets was concatenated and shuffled with seed 1000 - 7. Train subset = 155678 rows. Evaluation on 10% of concatenated 'validation' subsets = 1458 rows. See WandB logs. See report at REPORT WIP.
This model is a fine-tuned version of Google's T5-Base model tailored for summarizing financial 10K report sections. T5-Base-10K-Summarization is optimized to condense lengthy 10K reports into manageable summaries, enabling quick insights into financial data and trends. Ideal for use by financial analysts and regulatory agencies needing rapid insights from 10K reports. It may not be suited for summarizing non-financial documents or informal texts. Trained on a diverse collection of 10K reports from various industries, annotated for summarization to ensure broad applicability and accuracy. The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 8…
PTT5 Summ is a fine-tuned PTT5 model to perform Abstractive Summarization in Brazilian Portuguese texts. This model was fine-tuned on the datasets: RecognaSumm, WikiLingua, XL-Sum, TeMário.pdf) and CSTNews. For further information, please go to PTT5 Summ repository.
PTT5 Summ is a fine-tuned PTT5 model to perform Abstractive Summarization in Brazilian Portuguese texts. This model was fine-tuned on the datasets: RecognaSumm, WikiLingua, XL-Sum, TeMário.pdf) and CSTNews. For further information, please go to PTT5 Summ repository. author="Paiola, Pedro H. and de Rosa, Gustavo H. and Papa, Jo{\~a}o P.", editor="Xavier-Junior, Jo{\~a}o Carlos and Rios, Ricardo Ara{\'u}jo", title="Deep Learning-Based Abstractive Summarization for Brazilian Portuguese Texts", booktitle="BRACIS 2022: Intelligent Systems", year="2022", publisher="Springer International Publishing", address="Cham", pages="479--493", isbn="978-3-031-21689-3"} This model was fine-tuned using the…
The Fine-Tuned T5 Small is a variant of the T5 transformer model, designed for the task of text summarization. It is adapted and fine-tuned to generate concise and coherent summaries of input text. The model, named "t5-small," is pre-trained on a diverse corpus of text data, enabling it to capture essential information and generate meaningful summaries. Fine-tuning is conducted with careful attention to hyperparameter settings, including batch size and learning rate, to ensure optimal performance for text summarization. During the fine-tuning process, a batch size of 8 is chosen for efficient computation and learning. Additionally, a learning rate of 2e-5 is selected to balance convergence…