Downloads · 30 days
9
9% of all-time downloads
hari31416/indictrans2-indic-indic-1B-ONNX-fp16
indictrans2-indic-indic-1B-ONNX-fp16 is a translation model from hari31416. Use it when you need text moved from one language to another. It is set up for onnx. The card lists the license as mit.
[!TIP] This model is part of a suite of optimized/quantized ONNX versions of the base model. Other variants in this direction: - FP32 (Full Precision / Base): hari31416/indictrans2-indic-indic-1B-ONNX - FP16 (Half Pre…
Downloads · 30 days
9
9% of all-time downloads
All-time downloads
95
Public
Repo size
6.2 GB
Likes
0
Public
Click a slice to open those files.
.data2.4 GB · 97%
From the Hugging Face model README
[!TIP] This model is part of a suite of optimized/quantized ONNX versions of the base model. Other variants in this direction:
- FP32 (Full Precision / Base):
hari31416/indictrans2-indic-indic-1B-ONNX- FP16 (Half Precision):
hari31416/indictrans2-indic-indic-1B-ONNX-fp16(Current)- INT8 (Dynamic Quantization):
hari31416/indictrans2-indic-indic-1B-ONNX-int8- Q4F16 (4-bit Block Quantization):
hari31416/indictrans2-indic-indic-1B-ONNX-q4f16
ONNX-exported and quantized version of ai4bharat/indictrans2-indic-indic-1B
for in-browser and local edge inference.
Built for use with Transformers.js and onnxruntime-web in the browser, with fast BPE tokenizer.json files that don't require the SentencePiece WASM runtime.
These charts show overall tradeoffs, language-level parity, and category breakdown.

Compared against the FP32 ONNX oracle on the golden evaluation fixtures.
| Format | Model Size | Exact Match (Token) | Exact Match (Text) | SacreBLEU (Raw) | Latency (Mean) | Speedup vs. FP32 |
|---|---|---|---|---|---|---|
| FP32 | 7.03 GB | 100.00% | 100.00% | 100.00 | 94.7 ms | 1.000x |
| FP16 | 3.52 GB | 99.82% | 99.82% | 100.00 | 108.3 ms | 0.874x |
| INT8 | 1.76 GB | 83.64% | 83.73% | 94.22 | 43.7 ms | 2.240x |
| Q4F16 | 900.0 MB | 73.18% | 73.18% | 89.33 | 94.2 ms | 1.087x |
Exact match rates and translation quality (SacreBLEU / chrF) per language pair under this precision:
| Language Code | Total Fixtures | Token Match Rate | Text Match Rate | SacreBLEU | SacreBLEU (chrF) |
|---|---|---|---|---|---|
| asm_Beng | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| ben_Beng | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| brx_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| doi_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| gom_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| guj_Gujr | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| hin_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| kan_Knda | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| kas_Arab | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| mai_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| mal_Mlym | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| mar_Deva | 50 | 98.0% | 98.0% | 98.85 | 99.08 |
| mni_Beng | 50 | 98.0% | 98.0% | 97.89 | 98.89 |
| npi_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| ory_Orya | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| pan_Guru | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| san_Deva | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| sat_Olck | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| snd_Arab | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| tam_Taml | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| tel_Telu | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
| urd_Arab | 50 | 100.0% | 100.0% | 100.00 | 100.00 |
Exact match rates and translation quality grouped by category types:
| Category | Total Fixtures | Token Match Rate | Text Match Rate | SacreBLEU | SacreBLEU (chrF) |
|---|---|---|---|---|---|
| Generic | 286 | 100.0% | 100.0% | 100.00 | 100.00 |
| Lexicon | 264 | 99.2% | 99.2% | 99.48 | 99.64 |
| Numerals | 264 | 100.0% | 100.0% | 100.00 | 100.00 |
| Politics | 286 | 100.0% | 100.0% | 100.00 | 100.00 |
Here is a sample of up to 5 translation mismatches compared to the FP32 oracle. Many mismatches represent minor synonym differences or spacing variations.
അക്ഷരക്രമത്തിലാണ് പുസ്തകങ്ങൾ ഷെൽഫിൽ ക്രമീകരിച്ചിരിക്കുന്നത്.पुस्तके शेल्फवर अक्षरांच्या क्रमाने मांडण्यात आली आहेत.शेल्फवर शब्दलेखन क्रमाने पुस्तके मांडण्यात आली आहेत.कंपनी मैत्रीपूर्ण आणि सहाय्यक कामाचे वातावरण प्रदान करते.কম্পনী মৈত্রীপূর্ণ تہٕ معاون کامک ماحول چھ پیش کران ۔কম্পনী মৈত্রীপূর্ণ تہٕ সহযোগাত্মক কার্য পরিবেশ فراہم کران ۔encoder_model.onnx (and optional .onnx.data weights sidecar)decoder_model.onnx and decoder_with_past_model.onnx (share decoder_shared.onnx.data when present)translate.py — self-contained Python inference helper (see Usage below)tokenizer_src.json, tokenizer_tgt.json, tokenizer_meta.json)config.json, generation_config.json)# translate.py is included in this repo alongside the ONNX bundle.
# You can also find it (and read the full source) at:
# https://github.com/Hari31416/indictrans2-onnx-export/blob/main/src/translate.py
from translate import IndicTransONNX
# Pass a HF repo ID for automatic download, or a local bundle directory path
model = IndicTransONNX("hari31416/indictrans2-indic-indic-1B-ONNX-fp16")
print(model.translate("चुनाव कौन जीतेगा?", src_lang="hin_Deva", tgt_lang="tam_Taml"))
Required packages:
pip install onnxruntime tokenizers huggingface-hub
MIT (preserved from upstream AI4Bharat).