Instructions to use NifeLab/pib-en-indic-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use NifeLab/pib-en-indic-v1 with PEFT:
Task type is invalid.
- Transformers
How to use NifeLab/pib-en-indic-v1 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="NifeLab/pib-en-indic-v1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("NifeLab/pib-en-indic-v1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Card for pib-en-indic-v1
Model Details
Model Description
pib-en-indic-v1 is a LoRA adapter fine-tuned on AI4Bharat's IndicTrans2 (ai4bharat/indictrans2-en-indic-dist-200M) for English-to-Hindi translation. It is an Indic translation model for offline/air-gapped use: the adapter and base model run fully on-premise, with no external API calls required at inference time.
The IndicTrans2 base model supports translation across the 22 scheduled Indian languages (base-model capability; Nife has fine-tuned and validated this adapter for Hindi-English only).
- Developed by: Nife (NifeLab)
- Model type: LoRA/PEFT adapter for sequence-to-sequence translation
- Language(s) (NLP): English -> Hindi
- License: MIT
- Finetuned from model: ai4bharat/indictrans2-en-indic-dist-200M
Model Sources
- Base model: https://huggingface.co/ai4bharat/indictrans2-en-indic-dist-200M
- Base model repository: https://github.com/AI4Bharat/IndicTrans2
- Project page: https://nife.io/open-source
Uses
Direct Use
Machine translation from English into Hindi, tuned for formal/administrative text. Intended to be loaded as a LoRA adapter on top of the IndicTrans2 dist-200M base using the PEFT library, and runs in fully offline or air-gapped environments.
Out-of-Scope Use
- Language pairs other than Hindi-English.
- High-stakes translation (legal, medical, safety-critical) without human review.
- Domains far from the fine-tuning distribution (formal/administrative text).
Bias, Risks, and Limitations
This adapter inherits the limitations of the IndicTrans2 base model. Fine-tuning targeted Hindi-English translation of formal/administrative text; quality outside that pair and domain may be lower. Outputs should be reviewed by a human translator where accuracy matters.
Recommendations
Validate translation quality on your own data before production use. Use human review for any publishable or decision-driving output.
How to Get Started with the Model
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from peft import PeftModel
base = "ai4bharat/indictrans2-en-indic-dist-200M"
tokenizer = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
model = AutoModelForSeq2SeqLM.from_pretrained(base, trust_remote_code=True)
model = PeftModel.from_pretrained(model, "NifeLab/pib-en-indic-v1")
# Pre/post-processing with AI4Bharat's IndicTransToolkit is recommended,
# as with the base IndicTrans2 models.
Training Details
Training Data
Fine-tuned on publicly available PIB releases and other public government websites, together with the public Samanantar corpus from AI4Bharat (CC0). Only public sources were used; no proprietary or confidential data is included.
Training Procedure
Parameter-efficient fine-tuning (LoRA) of ai4bharat/indictrans2-en-indic-dist-200M.
Evaluation
No formal benchmark evaluation has been published for this adapter yet. Users should evaluate on their own data before relying on it.
Citation
If you use this model, please cite the IndicTrans2 base work:
@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}
}
- Downloads last month
- -
Model tree for NifeLab/pib-en-indic-v1
Base model
ai4bharat/indictrans2-en-indic-dist-200M