๐Ÿ‡ฎ๐Ÿ‡ณ BharatBhasha AI - Machine Translation (T2T) Models

Production-grade, INT8-quantized ONNX neural machine translation packages for AI4Bharat IndicTrans2, specifically optimized for offline deployment on Android mobile devices and edge environments.

๐Ÿ“ฆ Model Artifacts & Architecture

Model Bundle Direction Languages Supported Size Format
indictrans2-en-indic-dist-200M-ONNX-int8 English โ†’ Indic 22 Scheduled Indian Languages ~235 MB INT8 ONNX
indictrans2-indic-en-dist-200M-ONNX-int8 Indic โ†’ English 22 Scheduled Indian Languages ~235 MB INT8 ONNX
indictrans2-indic-indic-dist-320M-ONNX-int8 Indic โ†’ Indic Any pair among 22 Languages ~325 MB INT8 ONNX

Bundle Contents

Each model directory includes:

  • encoder_model.onnx: Quantized INT8 transformer encoder
  • decoder_model.onnx: Initial token decoder
  • decoder_with_past_model.onnx: Optimized decoder with past KV-cache reuse for low-latency generation
  • dict.SRC.json, dict.TGT.json: Vocabulary maps
  • model.SRC, model.TGT: SentencePiece tokenizer models
  • tokenizer_src.json, tokenizer_tgt.json: HuggingFace Fast Tokenizers

๐Ÿ“ฑ Mobile Android Deployment (ONNX Runtime Mobile)

Add to build.gradle.kts:

dependencies {
    implementation("com.microsoft.onnxruntime:onnxruntime-android:1.20.0")
}

Load the session with hardware acceleration:

val env = OrtEnvironment.getEnvironment()
val sessionOpts = OrtSession.SessionOptions().apply {
    addNnapi() // Android Neural Networks API acceleration
    setIntraOpNumThreads(4)
}
val encoderSession = env.createSession(encoderFile.absolutePath, sessionOpts)

โšก Inference Benchmarks

  • Encoder Latency (Mobile CPU/NNAPI): ~85ms
  • Decoder Latency Per Token: ~28ms
  • RAM Footprint: ~160 MB (Comfortably runs on 3GBโ€“4GB budget Android phones)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support