Instructions to use AchrafSoltani/MoRoBERTa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AchrafSoltani/MoRoBERTa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="AchrafSoltani/MoRoBERTa")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("AchrafSoltani/MoRoBERTa") model = AutoModelForMaskedLM.from_pretrained("AchrafSoltani/MoRoBERTa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
MoRoBERTa โ XLM-RoBERTa-base continued on Moroccan Arabizi
MoRoBERTa is XLM-RoBERTa-base continue-pretrained with masked language modelling on Moroccan Darija written in Latin script (Arabizi, with chat digits such as 3, 7 and 9). It is the Arabizi encoder of the IANLP 2026 paper that introduced the MoriscoNER corpus, and part of the Aljamiado project for Moroccan Latin-script NLP.
Training
- Corpus: 11,555 unique Arabizi sentences โ public YouTube comments on Moroccan content plus the MoriscoNER v1 training sentences (labels ignored), deduplicated, with sentences shorter than three words dropped and every sentence of the MoriscoNER gold test set excluded, so the encoder never saw test text. The comments themselves are not redistributed.
- Recipe: 8 epochs of masked language modelling (15 % masking), sequence length 128, batch 8 ร 4 gradient-accumulation steps, learning rate 3e-5 with 10 % warm-up, fp16, on one NVIDIA T4 (June 2026).
Use
Load it as an encoder and fine-tune it, for example for named-entity recognition on MoriscoNER. In the IANLP 2026 paper, MoRoBERTa fine-tuned on 1,400 native sentences reached 0.527 exact span-F1 on the MoriscoNER test set, against 0.464 for XLM-RoBERTa-base (three seeds each, same protocol).
Note on this repository
Until 19 October 2026 this repository held a different model: XLM-RoBERTa-base fine-tuned for NER on transliterated data. That model now lives at AchrafSoltani/xlmr-arabizi-darija-ner.
Citation
@inproceedings{soltani2026morisconer,
title = {{MoriscoNER}: A Native {Moroccan-Darija} Latin-Script {NER} Corpus and an Encoder-Conditional Native-vs-Transliteration Study},
author = {Soltani, Achraf},
booktitle = {Proceedings of IANLP 2026},
series = {Advances in Computer Science Applications and Research},
publisher = {Springer},
year = {2026},
note = {in press}
}
- Downloads last month
- 35
Model tree for AchrafSoltani/MoRoBERTa
Base model
FacebookAI/xlm-roberta-base