ai4bharat / indictrans2-indic-en-1B

huggingface.co
Total runs: 9.2K
24-hour runs: 0
7-day runs: 866
30-day runs: 2.7K
Model's Last Updated: May 02 2025
translation

Introduction of indictrans2-indic-en-1B

Model Details of indictrans2-indic-en-1B

IndicTrans2

This is the model card of IndicTrans2 Indic-En 1.1B variant.

Here are the metrics for the particular checkpoint.

Please refer to Appendix D: Model Card of the preprint for further details on model training, intended use, data, metrics, limitations and recommendations.

Usage Instructions

Please refer to the github repository for a detail description on how to use HF compatible IndicTrans2 models for inference.

import torch
from transformers import (
    AutoModelForSeq2SeqLM,
    AutoTokenizer,
)
from IndicTransTokenizer import IndicProcessor


model_name = "ai4bharat/indictrans2-indic-en-1B"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)

model = AutoModelForSeq2SeqLM.from_pretrained(model_name, trust_remote_code=True)

ip = IndicProcessor(inference=True)

input_sentences = [
    "जब मैं छोटा था, मैं हर रोज़ पार्क जाता था।",
    "हमने पिछले सप्ताह एक नई फिल्म देखी जो कि बहुत प्रेरणादायक थी।",
    "अगर तुम मुझे उस समय पास मिलते, तो हम बाहर खाना खाने चलते।",
    "मेरे मित्र ने मुझे उसके जन्मदिन की पार्टी में बुलाया है, और मैं उसे एक तोहफा दूंगा।",
]

src_lang, tgt_lang = "hin_Deva", "eng_Latn"

batch = ip.preprocess_batch(
    input_sentences,
    src_lang=src_lang,
    tgt_lang=tgt_lang,
)

DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

# Tokenize the sentences and generate input encodings
inputs = tokenizer(
    batch,
    truncation=True,
    padding="longest",
    return_tensors="pt",
    return_attention_mask=True,
).to(DEVICE)

# Generate translations using the model
with torch.no_grad():
    generated_tokens = model.generate(
        **inputs,
        use_cache=True,
        min_length=0,
        max_length=256,
        num_beams=5,
        num_return_sequences=1,
    )

# Decode the generated tokens into text
with tokenizer.as_target_tokenizer():
    generated_tokens = tokenizer.batch_decode(
        generated_tokens.detach().cpu().tolist(),
        skip_special_tokens=True,
        clean_up_tokenization_spaces=True,
    )

# Postprocess the translations, including entity replacement
translations = ip.postprocess_batch(generated_tokens, lang=tgt_lang)

for input_sentence, translation in zip(input_sentences, translations):
    print(f"{src_lang}: {input_sentence}")
    print(f"{tgt_lang}: {translation}")
Citation

If you consider using our work then please cite using:

@article{gala2023indictrans,
title={IndicTrans2: Towards High-Quality and Accessible Machine Translation Models for all 22 Scheduled Indian Languages},
author={Jay Gala and Pranjal A Chitale and A K Raghavan and Varun Gumma and Sumanth Doddapaneni and Aswanth Kumar M and Janki Atul Nawale and Anupama Sujatha and Ratish Puduppully and Vivek Raghavan and Pratyush Kumar and Mitesh M Khapra and Raj Dabre and Anoop Kunchukuttan},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2023},
url={https://openreview.net/forum?id=vfT4YuzAYA},
note={}
}

Runs of ai4bharat indictrans2-indic-en-1B on huggingface.co

9.2K
Total runs
0
24-hour runs
-67
3-day runs
866
7-day runs
2.7K
30-day runs

More Information About indictrans2-indic-en-1B huggingface.co Model

More indictrans2-indic-en-1B license Visit here:

https://choosealicense.com/licenses/mit

indictrans2-indic-en-1B huggingface.co

indictrans2-indic-en-1B huggingface.co is an AI model on huggingface.co that provides indictrans2-indic-en-1B's model effect (), which can be used instantly with this ai4bharat indictrans2-indic-en-1B model. huggingface.co supports a free trial of the indictrans2-indic-en-1B model, and also provides paid use of the indictrans2-indic-en-1B. Support call indictrans2-indic-en-1B model through api, including Node.js, Python, http.

indictrans2-indic-en-1B huggingface.co Url

https://huggingface.co/ai4bharat/indictrans2-indic-en-1B

ai4bharat indictrans2-indic-en-1B online free

indictrans2-indic-en-1B huggingface.co is an online trial and call api platform, which integrates indictrans2-indic-en-1B's modeling effects, including api services, and provides a free online trial of indictrans2-indic-en-1B, you can try indictrans2-indic-en-1B online for free by clicking the link below.

ai4bharat indictrans2-indic-en-1B online free url in huggingface.co:

https://huggingface.co/ai4bharat/indictrans2-indic-en-1B

indictrans2-indic-en-1B install

indictrans2-indic-en-1B is an open source model from GitHub that offers a free installation service, and any user can find indictrans2-indic-en-1B on GitHub to install. At the same time, huggingface.co provides the effect of indictrans2-indic-en-1B install, users can directly use indictrans2-indic-en-1B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

indictrans2-indic-en-1B install url in huggingface.co:

https://huggingface.co/ai4bharat/indictrans2-indic-en-1B

Url of indictrans2-indic-en-1B

indictrans2-indic-en-1B huggingface.co Url

Provider of indictrans2-indic-en-1B huggingface.co

ai4bharat
ORGANIZATIONS

Other API from ai4bharat

huggingface.co

Total runs: 240.9K
Run Growth: -11.3K
Growth Rate: -4.67%
Updated:August 08 2022
huggingface.co

Total runs: 30.5K
Run Growth: 2.8K
Growth Rate: 9.09%
Updated:October 06 2026
huggingface.co

Total runs: 9.3K
Run Growth: -649
Growth Rate: -7.00%
Updated:December 21 2022
huggingface.co

Total runs: 3.6K
Run Growth: 3.0K
Growth Rate: 84.05%
Updated:November 19 2025
huggingface.co

Total runs: 2.7K
Run Growth: -331
Growth Rate: -12.27%
Updated:August 08 2022
huggingface.co

Total runs: 757
Run Growth: -1.4K
Growth Rate: -189.17%
Updated:March 11 2024
huggingface.co

Total runs: 371
Run Growth: 259
Growth Rate: 70.57%
Updated:June 01 2022
huggingface.co

Total runs: 132
Run Growth: 39
Growth Rate: 29.77%
Updated:September 01 2026
huggingface.co

Total runs: 101
Run Growth: 12
Growth Rate: 11.88%
Updated:October 18 2024
huggingface.co

Total runs: 90
Run Growth: 11
Growth Rate: 12.22%
Updated:October 18 2024
huggingface.co

Total runs: 86
Run Growth: -2
Growth Rate: -2.33%
Updated:October 18 2024
huggingface.co

Total runs: 85
Run Growth: 12
Growth Rate: 14.12%
Updated:October 18 2024