indobart-v2-liputan6
indobenchmark/indobart-v2 fine-tuned for Indonesian news summarization on Liputan6 (Koto et al., 2020).
Part of indo-summarization-review-insights.
Training
- Data: 50,000 articles sampled (seed 42) from the Liputan6 canonical train
split after removing 5,184 "teaser" summaries and 879 duplicate articles.
The dateline (
Liputan6 . com , <City> :) is removed from inputs. - Max input / target length: 512 / 80 tokens.
- Early stopping on ROUGE-L of a fixed 1,000-article validation subset.
- Hardware: 2x Tesla T4, 99.6 minutes of training.
Results (beam search, 4 beams)
ROUGE F1 from rouge-score, stemmer off. ROUGE-Lsum is summary-level ROUGE-L.
| Test set | n | ROUGE-1 | ROUGE-2 | ROUGE-L | ROUGE-Lsum |
|---|---|---|---|---|---|
| canonical_test | 10,972 | 38.17 | 20.79 | 31.57 | 35.28 |
| xtreme_test | 3,862 | 32.19 | 13.04 | 24.91 | 28.88 |
Limitations and license
- The base model lowercases text, so outputs are lowercase.
- Non-commercial research use only. The Liputan6 authors forbid commercial use of the corpus and of models trained on it (Indonesian Copyright Law No. 28/2014).
Usage
The tokenizer needs a small wrapper (src/models/indobart_tokenizer.py in the GitHub repo):
import torch
from transformers import AutoModelForSeq2SeqLM
from src.models.indobart_tokenizer import IndoBARTTokenizer
tok = IndoBARTTokenizer.from_pretrained("Danyou7/indobart-v2-liputan6")
model = AutoModelForSeq2SeqLM.from_pretrained("Danyou7/indobart-v2-liputan6")
ids = tok.encode_with_specials(article, max_length=512)
out = model.generate(torch.tensor([ids])) # generation_config already holds decoder_start_token_id
print(tok.decode(out[0], skip_special_tokens=True))