google/fleurs
Viewer • Updated • 768k • 221k • 541
Offline Indic→English translation for on-device use with ONNX Runtime (Android or desktop). A quantised, repackaged copy of AI4Bharat's IndicTrans2 indic-en distilled 200M — not a new or retrained model. Made for Subtle, a live-subtitle app.
hari31416/indictrans2-indic-en-dist-200M-ONNX (MIT).src_vocab.txt (line = id), src_merges.txt (line = BPE rank), tgt_vocab.txt, plus it2.properties / it2_meta.json (dictionary sizes, special and language-tag ids).| File | Size |
|---|---|
encoder_model.onnx |
121 MB |
decoder_model.onnx |
111 MB (first decoding step) |
decoder_with_past_model.onnx |
101 MB (later steps, with KV cache) |
src_vocab.txt, src_merges.txt, tgt_vocab.txt, it2.properties, it2_meta.json |
6.5 MB |
hin_Deva eng_Latn <text> (Tamil: tam_Taml eng_Latn …).▁, apply BPE merges by rank, map to ids (unknown → <unk>, ids ≥ src_dict_size → <unk>), append </s> (id 2).decoder_start_id (2) until </s>: step 0 with decoder_model.onnx, later steps with decoder_with_past_model.onnx feeding each present.* output back as past_key_values.*.▁ → space, light English detokenisation.A reference implementation (Python, numpy + onnxruntime only) and a Kotlin/JVM port live in the Subtle repository (tools/asr-bench/it2lite.py, it2/IndicTrans2.kt); the Kotlin port reproduces the Python output on 40/40 test sentences.
Hindi→English, FLEURS hi_in dev, scored against the human English translations (en_us), correct Hindi as input.
| Translator | chrF (50 sent.) | Speed (laptop CPU) |
|---|---|---|
| Google Cloud Translation (online) | 70.3 | — |
| This package (int8, offline) | 67.9 | ~0.34 s/sentence, 2 threads |
| IndicTrans2 float (offline) | 67.9 | ~0.92 s/sentence |
| Google ML Kit (offline, on phone), 25 sentences | 57.4 (vs 66.1 for IndicTrans2 on the same 25) | — |
Translations are literal: recognition errors in the Hindi input pass through, whereas Google Cloud often repairs them from context.
hari31416/indictrans2-indic-en-dist-200M-ONNX — MIT.Base model
ai4bharat/indictrans2-indic-en-dist-200M