Diacritics expert of AraNeoBERT v7
Research checkpoint, not a release. Part of the AraNeoBERT v7 expert study: four expert branches (long context, dialect, diacritics, general) from one stem, and merges of them.
Branched from the AraNeoBERT v7 main run at step 620,000 (of a planned 733,262; 81.3B tokens seen), fresh optimizer, Muon, 131,072 tokens per step, lr 2.12e-4 with 1% warm-up. Released weights are the EMA (decay 0.999); the MLM decoder is identical to the token embedding (tied during training).
10,932 steps (1.4B tokens) at 1,024 tokens, learning-rate decay over the last 20%. Data: four passes over the vocalized books (Hindawi, Shamela) with 25% replay from the rest of the blend.
Evaluation (25 Nov 2026). Fine-tuning mean over AJGT, ArSarcasm, ASTD (macro-F1) and ANERcorp (entity-F1), best of lr 1e-5/2e-5, 3 epochs, 3 seeds: 76.39. Muradif synonym triplets without fine-tuning: 83.66. Masked-token accuracy on 512 held-out documents (FineWeb-2 dialect subsets, 15% masked): 55.3%. For reference, AraNeoBERT-v4: 77.48 and 78.72. Differences below about 0.5 points in the fine-tuning mean are within seed noise.
Architecture as AraNeoBERT v3-v6: 28-layer NeoBERT, hidden size 768, local/global attention (window 128, global every third layer), QK-norm, rotary positions.
Tokenizer: morphological v7b (CAMeL BERT tagger segmentation, proclitics split, enclitics marked, diacritics as pattern tokens), 64k SentencePiece Unigram. Feed raw text; the tokenizer normalizes and segments it.
from transformers import AutoTokenizer, AutoModelForMaskedLM
tok = AutoTokenizer.from_pretrained("miweru/AraNeoBERT-v7-expert-diacritics", trust_remote_code=True)
model = AutoModelForMaskedLM.from_pretrained("miweru/AraNeoBERT-v7-expert-diacritics", trust_remote_code=True)
Exported from runs/araneobert_v7_diakritika/final.pt.