Views
No views yet
oddadmix/50M-2048-Emhotob on
the full freococo/arabic_tashkil_dataset
(~1.5M gold-standard vocalized pages of classical Arabic / Islamic texts).oddadmix/Emhotob-50M-Tashkil-v1
and substantially better at word preservation.License note: the training data is licensed CC BY-NC-ND 4.0 (non-commercial, no-derivatives). This model is released under the same license to respect the upstream terms. Use accordingly.
شكِّل النص العربي التالي:
{undiacritized text}
### الرد:
{diacritized text}</s> ← loss only here1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "oddadmix/Emhotob-50M-Tashkil-v2"
5tok = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16).cuda().eval()
7
8text = "ذهب الطالب الى المدرسة"
9prompt = f"شكِّل النص العربي التالي:\n{text}\n### الرد:\n"
10ids = [tok.bos_token_id] + tok.encode(prompt, add_special_tokens=False)
11out = model.generate(
12 torch.tensor([ids]).cuda(),
13 max_new_tokens=512, do_sample=False,
14 eos_token_id=tok.eos_token_id, pad_token_id=tok.pad_token_id,
15)
16print(tok.decode(out[0][len(ids):], skip_special_tokens=True))max-chars 2500 pre-filter; ~32% of
pages that would require truncation were dropped rather than corrupt the add-only
training signal). A disjoint 4,000-row validation set was carved with a fixed seed.| Metric | Value |
|---|---|
| Diacritic Error Rate (DER) ↓ | 1.32% |
| Character accuracy ↑ | 98.68% |
| Exact sentence match ↑ | 32.67% |
| Word preservation — skeleton exact ↑ | 97.33% |
| Word preservation — word-count match ↑ | 98.33% |
| Word preservation — mean word survival ↑ | 98.60% |
test split (never seen during training):| Metric | Value |
|---|---|
| DER ↓ | 2.03% |
| Word preservation — skeleton exact ↑ | 95.33% |
| Word preservation — mean word survival ↑ | 97.98% |
skeleton exact = strip all diacritics from the output and check it equals the input
character-for-character — the strongest guarantee the model only added marks.§ and
-[NN]- structural markers preserved). Domain-shifted text may see higher DER.