Views
No views yet
moussaKam/AraBART for Arabic abstractive news summarization on the XL-Sum Arabic split.csebuetnlp/xl-sum's multilingual_rouge_scoring with lang='arabic', the same Snowball-based stemmer used by the XL-Sum paper). Generation parameters match the paper: num_beams=4, no_repeat_ngram_size=2, length_penalty=0.6, max_length=84.| Model | ROUGE-1 ↑ | ROUGE-2 ↑ | ROUGE-L ↑ | BLEU ↑ |
|---|---|---|---|---|
| AraBART (pretrained, no fine-tune) | 20.25 | 5.08 | 13.48 | 1.83 |
mT5-XLSum (zero-shot, csebuetnlp/mT5_multilingual_XLSum) | 34.82 | 14.77 | 29.17 | 7.43 |
| AraBART (fine-tuned, this model) | 34.99 | 15.77 | 29.56 | 8.26 |
arabic_train.jsonl / arabic_val.jsonl / arabic_test.jsonl), distributed by the authors as arabic_XLSum_v2.0.tar.bz2.U+064B–U+065F, U+0670) and tatweel (U+0640).transformers Seq2SeqTrainer.| Base model | moussaKam/AraBART (mBART arch., 6 enc / 6 dec layers, ~139 M params) |
| Train set | full cleaned XL-Sum Arabic train split (~37k pairs) |
| Eval set during training | 2,000 sampled pairs from the val split |
| Epochs | 3 |
| Per-device batch size | 4 |
| Gradient accumulation | 4 (effective batch 16) |
| Optimizer | AdamW (HF default) |
| Learning rate | 2e-5 |
| LR schedule | cosine, warmup ratio 0.1 |
| Weight decay | 0.01 |
| Label smoothing | 0.1 |
max_input_length | 512 |
max_target_length | 84 |
| Generation (eval) | num_beams=6, length_penalty=0.6 |
| Generation (inference / reported test) | num_beams=4, no_repeat_ngram_size=2, length_penalty=0.6, max_length=84 |
| Mixed precision | fp16 |
| Seed | 42 |
load_best_model_at_end=True with metric_for_best_model='eval_loss' — the published checkpoint is the epoch with the lowest validation loss.1import re
2from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
4REPO = "Omar10lfc/arabart-xlsum-arabic" # replace with your username if different
5tok = AutoTokenizer.from_pretrained(REPO)
6mdl = AutoModelForSeq2SeqLM.from_pretrained(REPO)
7
8article = "..." # Arabic news article text
9
10# Same minimal cleaning used during training (diacritics + tatweel + whitespace).
11AR_DIACRITICS = re.compile(r"[ً-ٰٟ]")
12TATWEEL = re.compile(r"ـ")
13WS = re.compile(r"\s+")
14def clean_arabic(t: str) -> str:
15 t = AR_DIACRITICS.sub("", t)
16 t = TATWEEL.sub("", t)
17 return WS.sub(" ", t).strip()
18
19enc = tok(clean_arabic(article), max_length=512, truncation=True,
20 padding="max_length", return_tensors="pt")
21ids = mdl.generate(
22 input_ids=enc["input_ids"],
23 attention_mask=enc["attention_mask"],
24 max_length=84,
25 min_length=10,
26 num_beams=4,
27 no_repeat_ngram_size=2,
28 length_penalty=0.6,
29 early_stopping=True,
30)
31print(tok.batch_decode(ids, skip_special_tokens=True,
32 clean_up_tokenization_spaces=False)[0])1from transformers import pipeline
2summ = pipeline("summarization", model=REPO, tokenizer=REPO)
3print(summ(article, max_length=84, min_length=10, num_beams=4,
4 no_repeat_ngram_size=2, length_penalty=0.6)[0]["summary_text"])1@misc{arabart-xlsum-arabic,
2 title = {arabart-xlsum-arabic: Fine-tuned AraBART for Arabic abstractive summarization on XL-Sum},
3 author = {{Omar10lfc}},
4 year = {2026},
5 howpublished = {Hugging Face},
6 note = {Fine-tune of moussaKam/AraBART on the Arabic split of XL-Sum, ROUGE-1 34.99 / ROUGE-2 15.77 / ROUGE-L 29.56.}
7}1@inproceedings{kamal-eddine-etal-2022-arabart,
2 title = {{A}ra{BART}: a Pretrained {A}rabic Sequence-to-Sequence Model for Abstractive Summarization},
3 author = {Kamal Eddine, Moussa and Tomeh, Nadi and Habash, Nizar and
4 Le Roux, Joseph and Vazirgiannis, Michalis},
5 booktitle = {Proceedings of the The Seventh Arabic Natural Language Processing Workshop (WANLP)},
6 year = {2022}
7}
8
9@inproceedings{hasan-etal-2021-xl,
10 title = {{XL}-Sum: Large-Scale Multilingual Abstractive Summarization for 44 Languages},
11 author = {Hasan, Tahmid and Bhattacharjee, Abhik and Islam, Md. Saiful and
12 Mubasshir, Kazi and Li, Yuan-Fang and Kang, Yong-Bin and
13 Rahman, M. Sohel and Shahriyar, Rifat},
14 booktitle = {Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021},
15 year = {2021}
16}