A character-level Transformer that adds diacritics to Kashmiri text in Perso-Arabic script, in the IndicVoices spelling style. It is the second stage of our English-to-Kashmiri pipeline: the translator writes Kashmiri without diacritics, and this model puts them back.
It never changes letters, spaces or punctuation. For each Kashmiri letter it picks one of 42 classes: no mark, or one of the 41 mark combinations seen at least 20 times in training.
from kashmiri_restorer import KashmiriRestorer
restorer = KashmiriRestorer.from_pretrained(".")
restorer.restore(["کشمیر چھ اکھ خوبصورت جاے"])
Requires torch and safetensors. See the translator page for the full pipeline, results and comparison with other models.
| Setting | Value |
|---|---|
| Input -> target | Kashmiri with marks removed -> the original marks |
| Data | 244,303 Kashmiri-only rows: 106,697 from the Kashmiri side of BPCC seed, NLLB-Seed and BPCC-Daily, and 137,606 IndicVoices transcripts |
| Network | 12 layers, width 1,024, 16 heads, feed-forward 4,096; trained from scratch |
| Noise | Half of examples have 5% of words deleted and 15% replaced, to mimic translation errors |
| Optimizer | AdamW (0.9, 0.98), weight decay 0.01, LR 1.5e-4, cosine schedule over 32,000 updates |
| Selection | Best KATHE score on the translator's development outputs (update 4,000) |
Benchmark, development and IndicVoices validation-speaker text were excluded from training.
Applied to our translator's four-beam drafts. No-diacritic BLEU is unchanged by design.
| Test set | KATHE score, draft + restorer |
|---|---|
| IN22-Conv | 17.67 |
| IN22-Gen | 19.21 |
| SMOL | 6.68 |
| FLORES-200 devtest | 16.09 |
| Mean | 14.91 |
We swapped each public Kashmiri diacritizer into the same pipeline: same translator drafts, same KATHE scoring. Cells are KATHE scores.
| Diacritizer | Size | IN22-Conv | IN22-Gen | SMOL | FLORES | Mean |
|---|---|---|---|---|---|---|
| Koshur-JibDiacritizer-152M (this model) | 152M | 17.67 | 19.21 | 6.68 | 16.09 | 14.91 |
| Omarrran/koshur-diacritizer-byt5-small-v2 | 300M | 16.71 | 16.92 | 6.56 | 15.38 | 13.89 |
| Omarrran/koshur-diacritizer-byt5-small | 300M | 15.36 | 18.39 | 6.56 | 14.11 | 13.61 |
| No diacritizer | 6.57 | 12.84 | 6.75 | 14.91 | 10.27 |
This model is ahead of the stronger ByT5 model by about 1 KATHE point on average. Paired bootstrap 95% intervals exclude zero on IN22-Conv, IN22-Gen and FLORES; SMOL is a tie. The ByT5 models were given their own input normalization, which scored higher than our raw drafts, and their published letter-change guard. It is also smaller and labels every character in one pass instead of generating byte by byte. Faizaniqbal/koshur-diacritizer-byt5-small has weights identical to Omarrran v1.
Apache-2.0. Trained from scratch on Kashmiri text only; it contains no Sarvam or Gemma weights.
Training data: BPCC seed and BPCC-H-Daily (AI4Bharat, CC-BY-4.0), NLLB-Seed (Meta, CC-BY-SA-4.0, distributed via BPCC) and IndicVoices Kashmiri transcripts (AI4Bharat, CC-BY-4.0). The design builds on Noore's KATHE 2026 restorer.