Instructions to use Aju360/kathe-r12-200m-selected with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aju360/kathe-r12-200m-selected with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="Aju360/kathe-r12-200m-selected", trust_remote_code=True)# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("Aju360/kathe-r12-200m-selected", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
kathe-r12-200m-selected โ English โ Kashmiri (Perso-Arabic)
Fine-tune of ai4bharat/indictrans2-en-indic-dist-200M
for the KATHE 2026 shared task (Gaash Lab / NIT Srinagar + Bureau of Indian
Standards). English (eng_Latn) โ Kashmiri, Perso-Arabic script (kas_Arab).
Code, full model card and reproduction steps: https://github.com/AzhadArshad/kathe_2026
โ ๏ธ This model is half of a system. Do not use it alone.
On the competition test set this checkpoint scores 10.00 by itself and 15.05 once diacritic restoration is applied. That is not a polish step, and the reason is structural rather than a quality issue:
IndicTrans2's target vocabulary holds 122,672 tokens. The three Kashmiri short
vowels โ kasra (U+0650), damma (U+064F), fatha (U+064E) โ each appear in
exactly one of them, the bare standalone mark. To write ฺฺพูุณ the decoder
would have to split a word to insert a bare diacritic that occurs in no natural
subword context, and beam search never will. This model therefore emits
exactly zero of these three marks, no matter how it is trained โ the
vocabulary is frozen in the pretrained checkpoint.
The companion restorer puts them back:
Aju360/kathe-r11-restorer.
| System | Score |
|---|---|
| this model alone | 10.00 |
| + diacritic lexicon | 13.52 |
| + learned restorer | 13.99 |
| + both (shipped) | 15.05 |
Score = geometric mean of BLEU (13a) and chrF++ (word_order=2), after
KashmiriNormalizer==0.1.0 on both sides.
Usage
The reliable path is the repository's one command, which runs the decode and the restoration and refuses to emit output with a changed row count, an empty row, or restoration that added no marks:
git clone https://github.com/AzhadArshad/kathe_2026 && cd kathe_2026
python scripts/generate_translations.py --input input.csv --output output.csv
Direct use, if you are handling restoration yourself:
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from IndicTransToolkit.processor import IndicProcessor # required on BOTH sides
ip = IndicProcessor(inference=True)
tok = AutoTokenizer.from_pretrained("Aju360/kathe-r12-200m-selected", trust_remote_code=True)
mdl = AutoModelForSeq2SeqLM.from_pretrained("Aju360/kathe-r12-200m-selected", trust_remote_code=True).eval()
sents = ["He lost his pen.", "I go to my school daily."]
batch = ip.preprocess_batch(sents, src_lang="eng_Latn", tgt_lang="kas_Arab")
enc = tok(batch, truncation=True, padding=True, max_length=256, return_tensors="pt")
with torch.inference_mode():
out = mdl.generate(**enc, num_beams=5, max_new_tokens=256, use_cache=True)
with tok.as_target_tokenizer():
dec = tok.batch_decode(out, skip_special_tokens=True)
print(ip.postprocess_batch(dec, lang="kas_Arab")) # still missing short vowels
IndicProcessor must run on both sides. Skipping either produces output that
looks plausible and scores badly. Requires transformers==4.46.1 โ later
releases break IndicTransToolkit at import.
Training
| Base | indictrans2-en-indic-dist-200M (211M params, MIT) |
| Data | BPCC kas_Arab, filtered to 123,538 pairs, then semantically re-weighted toward the test distribution |
| Regime | Full fine-tune, lr 5e-5, inverse-sqrt, label smoothing 0.1, effective batch 128, 6 epochs |
| Hardware | Kaggle T4 ร2, DDP |
Corpus selection was worth +1.17 over the same recipe on the unselected corpus. The test set is short everyday sentences (7.3 words mean) while BPCC averages 15.4, so pairs near the test distribution were upweighted 3x. Upweighting harder was monotonically worse (7x and 31x both regressed).
Why the 200M and not the 1B. A LoRA fine-tune of indictrans2-en-indic-1B
on the same corpus scored below its own zero-shot baseline. IndicTrans2 was
trained on BPCC, so fine-tuning the 1B on BPCC re-teaches what it already knows.
The 200M is a distilled checkpoint, and distillation discarded information
that BPCC training puts back โ which is why the smaller model had headroom the
larger one did not.
Limitations
- Emits no kasra, damma or fatha. Structural, described above. Pair it with the restorer.
- Tuned for short everyday sentences. Long encyclopedic prose is out of register.
- Perso-Arabic (
kas_Arab) only, not Devanagari (kas_Deva). - Occasional Urdu drift: 2.7% of test rows contain an Urdu function word against 1.2% in human references.
- Decoding is device-sensitive โ CPU fp32 and GPU fp16 differ on ~1.2% of rows through beam near-ties.
Licence and attribution
Released under MIT, inherited from the IndicTrans2 base model. Training data
is BPCC: bpcc-seed-v1/v2/latest and daily are CC-BY-4.0 and require
attribution; nllb_filtered and nllb_seed are CC0. See NOTICE and
MODEL_CARD.md in the repository for the full chain.
AI4Bharat et al., IndicTrans2: Towards High-Quality and Accessible Machine Translation Models for all 22 Scheduled Indian Languages, 2023.
- Downloads last month
- 27
Model tree for Aju360/kathe-r12-200m-selected
Base model
ai4bharat/indictrans2-en-indic-dist-200M