Views
No views yet
[!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-en-1B-ONNX- FP16 (Half Precision):
hari31416/indictrans2-indic-en-1B-ONNX-fp16- INT8 (Dynamic Quantization):
hari31416/indictrans2-indic-en-1B-ONNX-int8(Current)- Q4F16 (4-bit Block Quantization):
hari31416/indictrans2-indic-en-1B-ONNX-q4f16
ai4bharat/indictrans2-indic-en-1B
for in-browser and local edge inference.


| Format | Model Size | Exact Match (Token) | Exact Match (Text) | SacreBLEU (Raw) | Latency (Mean) | Speedup vs. FP32 |
|---|---|---|---|---|---|---|
| FP32 | 4.88 GB | 100.00% | 100.00% | 100.00 | 49.0 ms | 1.000x |
| FP16 | 2.44 GB | 99.82% | 99.82% | 99.96 | 49.7 ms | 0.987x |
| INT8 | 1.22 GB | 94.45% | 94.45% | 98.00 | 25.2 ms | 1.900x |
| Q4F16 | 625.0 MB | 88.55% | 88.55% | 95.44 | 42.7 ms | 1.080x |
| Language Code | Total Fixtures | Token Match Rate | Text Match Rate | SacreBLEU | SacreBLEU (chrF) |
|---|---|---|---|---|---|
| eng_Latn | 1100 | 94.5% | 94.5% | 98.00 | 99.02 |
| Category | Total Fixtures | Token Match Rate | Text Match Rate | SacreBLEU | SacreBLEU (chrF) |
|---|---|---|---|---|---|
| Generic | 286 | 92.0% | 92.0% | 96.82 | 98.21 |
| Lexicon | 264 | 91.7% | 91.7% | 97.27 | 98.91 |
| Numerals | 264 | 98.5% | 98.5% | 99.62 | 99.86 |
| Politics | 286 | 95.8% | 95.8% | 98.30 | 99.12 |
সাগৰ সুৰক্ষিত কৰিবলৈ আমি প্লাষ্টিকৰ আৱৰ্জনা হ্ৰাস কৰিব লাগে।To protect the oceans, we should reduce plastic waste.To protect the ocean, we should reduce plastic waste.খালী সময়ত উপন্যাস পঢ়িবলৈ ভাল পায়।He likes to read novels in his free time.He likes to read novels in his spare time.চিকিৎসালয়খনে 24 ঘণ্টা জৰুৰীকালীন চিকিৎসা সেৱা প্ৰদান কৰে।The hospital provides 24-hour emergency medical care.The hospital provides 24-hour emergency medical services.কৃত্রিম বুদ্ধিমত্তা শিক্ষার ক্ষেত্রকে বদলে দিচ্ছে।Artificial intelligence is transforming the education sector.Artificial intelligence is changing the education sector.সমুদ্রকে রক্ষা করতে আমাদের প্লাস্টিক বর্জ্য হ্রাস করতে হবে।We need to reduce plastic waste to protect the oceans.To protect the ocean, we need to reduce plastic waste.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)1# translate.py is included in this repo alongside the ONNX bundle.
2# You can also find it (and read the full source) at:
3# https://github.com/Hari31416/indictrans2-onnx-export/blob/main/src/translate.py
4
5from translate import IndicTransONNX
6
7# Pass a HF repo ID for automatic download, or a local bundle directory path
8model = IndicTransONNX("hari31416/indictrans2-indic-en-1B-ONNX-int8")
9print(model.translate("चुनाव कौन जीतेगा?", src_lang="hin_Deva", tgt_lang="eng_Latn"))pip install onnxruntime tokenizers huggingface-hub