OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Indictranstoolkit

Indictranstoolkit is a modular Python library for working with IndicTrans2 and Rotary-IndicTrans2 translation models, including their Hugging Face releases. It provides batch text preprocessing and post-processing through IndicProcessor, plus IndicEvaluator for BLEU and ChrF2++ evaluation.

Independent OpenViST project profile, based on linked sources.

Indictranstoolkit — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when building a Python workflow around supported IndicTrans2-family models and you need the toolkit’s batch preprocessing, output post-processing, or evaluation utilities.

Who it is for

  • Developers integrating IndicTrans2 model support into applications or translation workflows.
  • Practitioners preparing batches for model inference and normalizing decoded translations.
  • Teams evaluating translation predictions against reference text.

Documented uses

  • Prepare sentence batches using source and target language codes before model tokenization.
  • Post-process decoded model outputs, including batches with multiple generated sequences when configured accordingly.
  • Calculate BLEU and ChrF2++ scores from prediction and reference files or lists.
Before you choose

Requirements & limits

The repository is public and MIT-licensed. Setup documentation specifies Python 3.10+ and Linux or macOS; Windows is not currently intended, built, or tested.

  • The toolkit supports model-side workflow components; the README example loads the model and tokenizer separately.
  • The repository recommends numpy 2.1+, torch 2.5+, and transformers 4.51+ and does not guarantee stability below those versions.
  • The project reports that IndicEvaluator can produce slightly lower scores than the original IndicTrans2 evaluation script.
  • For generation with multiple return sequences, the matching count must also be passed to postprocess_batch.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Prepare model input and post-process translated output

Use IndicProcessor around a Hugging Face IndicTrans2 model generation workflow.

Before you start

  • Python 3.10 or later on Linux or macOS
  • Indictranstoolkit, torch, transformers, and a compatible Hugging Face IndicTrans2 model and tokenizer
  • A batch of source sentences and source and target language codes

Steps

  1. Create IndicProcessor(inference=True) and load the model and tokenizer with the Hugging Face APIs shown in the README.

  2. Call preprocess_batch with the sentences and source and target language codes.

  3. Tokenize the processed batch, generate model outputs, and decode them with the tokenizer.

  4. Pass decoded outputs to postprocess_batch with the target language code.

Expected outcome

A list of post-processed translations, as illustrated in the README’s English-to-Hindi example.

Guide limitations

  • The guide follows the repository’s example and does not establish performance or compatibility for other environments or models.
  • If generation uses more than one return sequence, the README says to set the corresponding num_return_sequences value in postprocess_batch.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
VarunGumma/IndicTransToolkit · Official homepage title · retained in its source language