translate-it2-hindi-bodo
Bidirectional Hindi ↔ Bodo translation model, fine-tuned from ai4bharat/indictrans2-indic-indic-dist-320M (IndicTrans2, 320M parameters).
| Directions | Hindi → Bodo and Bodo → Hindi |
| Language codes | Hindi hin_Deva, Bodo brx_Deva |
| Format | Hugging Face Transformers (model.safetensors, float32) |
Usage
The model uses IndicTrans2's custom code, so trust_remote_code=True is required.
pip install torch transformers IndicTransToolkit
import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from IndicTransToolkit.processor import IndicProcessor
repo = "COIL-D/translate-it2-hindi-bodo"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForSeq2SeqLM.from_pretrained(repo, trust_remote_code=True).eval()
ip = IndicProcessor(inference=True)
def translate(sentences, src_lang, tgt_lang):
batch = ip.preprocess_batch(sentences, src_lang=src_lang, tgt_lang=tgt_lang)
inputs = tokenizer(batch, padding="longest", truncation=True, max_length=256, return_tensors="pt")
with torch.no_grad():
generated = model.generate(**inputs, num_beams=5, max_length=256)
outputs = tokenizer.batch_decode(generated, skip_special_tokens=True)
return ip.postprocess_batch(outputs, lang=tgt_lang)
# Hindi -> Bodo
print(translate(["मुझे आज बाज़ार जाना है और कुछ सब्ज़ियाँ खरीदनी हैं।"], "hin_Deva", "brx_Deva"))
# Bodo -> Hindi
print(translate(["your Bodo input text here"], "brx_Deva", "hin_Deva"))
Citation
If you use this model, please cite:
@misc{singh2026coildindiccentricparallelcorpus,
title={COILD: An Indic-Centric Parallel Corpus and Benchmark for Machine Translation Across Indian Languages},
author={Kshetrimayum Boynao Singh and Nitin Kumar Mishra and Palash Pratim Dutta and Atai Waris Khan and Aparna Kaushik and Avinash Kumar and Deeksha and Deepak Kumar and Saroj Kumar Jha and Saloka Sengupta and Anansa Roy and Umalatha Kannoth and Saifulla Samar and Meena Sharma and Manpreet Kaur and Jyoti Sharma and Ashwini Vaidya and Muralikrishna SN and Md Shad Akhtar and Poonam Bansal and Amita Dev and Sanasam Ranbir Singh and Samit Bhattacharya and Tanmoy Chakraborty and Asif Ekbal},
year={2026},
eprint={2609.28826},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2609.28826},
}