Downloads ยท 30 days
48
62% of all-time downloads
alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse
marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse is a token classification model from alighabusaleh. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as cc-by-4.0.
๐ Try it live: Dialectal Arabic demos runs this model in your browser.
Downloads ยท 30 days
48
62% of all-time downloads
All-time downloads
78
Public
Parameters
162M
900 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors649 MB ยท 72%
From the Hugging Face model README
๐ Try it live: Dialectal Arabic demos runs this model in your browser.
A fine-tuned MARBERTv2 token classifier that detects character-level error spans in EnglishโArabic-dialect machine translations and assigns each span an LQM/MQM-style error category. It is TTLab's system for AlexandriaX-2026 Subtask 3 and is described in TTLab at AlexandriaX-2026: A Fine-Tuned Surface Tagger for Arabic Machine-Translation Error-Span Detection and Classification (Abusaleh, Verma & Mehler, ArabicNLP 2026).
This is the revised system from the paper's ablation: the same tagger, but trained on all six original LQM categories without collapsing the rare ones. In the paper, this configuration raised the official test Overall Score from 40.91 (official submission) to 42.00 (scored by the organizers after the evaluation period).
The exact official-submission checkpoint (rank 3, 40.91) is at alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026.
UBC-NLP/AlexandriaX_Subtask_3 (1,125 train / 138 dev sentences)ENG_EGY (Egyptian), ENG_MAU (Mauritanian), ENG_MOR (Moroccan), ENG_PAL (Palestinian), ENG_UAE (Emirati)The model tags each sub-word token of the Arabic MT output only (the English source is not an input) over the labels
O, graphetics, morphosyntax, orthography_writing_conventions, pragmatics, semantics, sociolinguistics. At inference, a token is flagged as an error when 1 - P(O) reaches a dialect-specific threshold
ฯ_d, and it takes the most probable error category. Contiguous same-category tokens are merged, mapped back to
character offsets with the tokenizer's offset mapping, trimmed of whitespace and punctuation, and spans shorter than
2 characters are dropped.
The head predicts O plus all six original categories directly; no label remapping is applied.
The thresholds are stored in span_decoding.json:
| Direction | ฯ_d |
|---|---|
ENG_EGY | 0.325 |
ENG_MAU | 0.2 |
ENG_MOR | 0.2 |
ENG_PAL | 0.225 |
ENG_UAE | 0.225 |
The span decoding (thresholds + merging) lives in inference.py, which ships in this repo:
from huggingface_hub import hf_hub_download
import importlib.util, sys
spec = importlib.util.spec_from_file_location("inference", hf_hub_download("alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse", "inference.py"))
inference = importlib.util.module_from_spec(spec); spec.loader.exec_module(inference)
tagger = inference.ErrorSpanTagger("alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse")
mt = "ููุง ุฎููู ููุงูุงุ ูุฐุง ุฎุฑุงุจูุท. ุงูุช ู
ุง ุชุฏุฑู ุฅุฐุง ูู ุชุฃู ููุง ูุงุ ูุฅุฐุง ูู ุชุฃู ูุณู
ููู ุฃููู ูููู. ูุญูุง ุจุนุฏูุง ูุงูุฏ ุจุฏุฑู."
print(tagger.predict(mt, direction="ENG_UAE"))
# [{'text': ..., 'start': ..., 'end': ..., 'category': ...}, ...]
Batch tagging of a JSONL file (id, direction, source, model_prediction per line), writing the
Codabench LQM_prediction_tagged_errors format:
python inference.py alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse test.jsonl predictions.jsonl
To get raw per-token probabilities, the checkpoint loads as a standard BertForTokenClassification:
from transformers import AutoTokenizer, AutoModelForTokenClassification
tok = AutoTokenizer.from_pretrained("alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse")
model = AutoModelForTokenClassification.from_pretrained("alighabusaleh/marbertv2-arabic-dialect-mt-error-span-detection-alexandriax2026-nocollapse")
For an unseen direction, the decoder falls back to ฯ = 0.4.
| Backbone | UBC-NLP/MARBERTv2 (fine-tuned end-to-end, linear head, dropout 0.1) |
| Data | full AlexandriaX Subtask 3 training set (1,125 sentences) |
| Loss | focal loss, ฮณ = 2, O class weight ฮฑ = 0.3 |
| Optimiser | AdamW, lr 2e-5, batch 16, 12 epochs, grad-clip 1.0 |
| Max length | 192 sub-word tokens (longer outputs are truncated) |
| Seed | 42 |
| Thresholds | per-direction, tuned on 5-fold out-of-fold predictions over the grid 0.20 to 0.70 in steps of 0.025 |
Overall = (overlap-span F1 + category F1) / 2, in percent. The official Codabench metric uses macro averages over directions. Our dev "proxy" uses character-overlap F1 + category micro-F1 and is not directly comparable.
| Split | Overall | Notes |
|---|---|---|
| Official test, original run of this config (paper) | 42.00 | scored by the organizers post-evaluation |
| Dev (138 sents, our proxy scorer), this checkpoint | 38.5 | overlap F1 48.1, category micro-F1 28.9 |
Reproducibility note: the weights of the run behind the 42.00 score were not kept. This checkpoint is a fresh full-training-set retrain with the identical configuration, seed and thresholds. Because of GPU non-determinism it is not bit-identical: on the test set its predictions match the scored run's on 138 of 145 sentences (character-level span+category F1 0.95 between the two), and the original run scored 40.1 on dev. Expect a test score close to, but not guaranteed to equal, 42.00. For the exact ranked system, use the official-submission checkpoint.
sociolinguistics accounts for 58% of spans and graphetics has
2 training examples. Localisation is reasonable (overlap F1 โ 46โ48), but category assignment is the bottleneck:
morphosyntax, pragmatics and graphetics are rarely or never recovered.If you use this model, please cite:
@inproceedings{Abusaleh:et:al:2026:mt,
title = {TTLab at AlexandriaX-2026: A Fine-Tuned Surface Tagger for Arabic
Machine-Translation Error-Span Detection and Classification},
author = {Ali Abusaleh and Bhuvanesh Verma and Alexander Mehler},
booktitle = {SIGARAB ArabicNLP 2026 AlexandriaX Shared Task},
year = {2026},
address = {Budapest, Hungary},
note = {accepted}
}
The model builds on MARBERTv2 (Abdul-Mageed et al., ACL 2021) and the AlexandriaX-2026 shared-task data; please cite those as well where appropriate.