Downloads · 30 days
7
3% of all-time downloads
hari31416/indictrans2-indic-indic-dist-320M-ONNX
indictrans2-indic-indic-dist-320M-ONNX 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-dist-320M-ONNX (Current)…
Downloads · 30 days
7
3% of all-time downloads
All-time downloads
206
Public
Repo size
4.2 GB
Likes
0
Public
Click a slice to open those files.
.data1.3 GB · 95%
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-dist-320M-ONNX(Current)- FP16 (Half Precision):
hari31416/indictrans2-indic-indic-dist-320M-ONNX-fp16- INT8 (Dynamic Quantization):
hari31416/indictrans2-indic-indic-dist-320M-ONNX-int8- Q4F16 (4-bit Block Quantization):
hari31416/indictrans2-indic-indic-dist-320M-ONNX-q4f16
ONNX-exported and quantized version of ai4bharat/indictrans2-indic-indic-dist-320M
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 | 1.87 GB | 100.00% | 100.00% | 100.00 | 23.0 ms | 1.000x |
| FP16 | 980.2 MB | 99.82% | 99.82% | 100.00 | 27.4 ms | 0.840x |
| INT8 | 497.1 MB | 72.18% | 72.36% | 87.13 | 16.5 ms | 1.475x |
| Q4F16 | 711.6 MB | 45.91% | 46.36% | 71.64 | 28.3 ms | 0.829x |
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-dist-320M-ONNX")
print(model.translate("चुनाव कौन जीतेगा?", src_lang="hin_Deva", tgt_lang="tam_Taml"))
Required packages:
pip install onnxruntime tokenizers huggingface-hub
MIT (preserved from upstream AI4Bharat).