Nepali → English (nep-eng-lora-v3-address)

Full merged fine-tune of ai4bharat/indictrans2-indic-en-dist-200M for domain Nepali→English translation (agri, finance, entity, address + BPCC replay).

LoRA (r=16, α=32) merged into base weights. Same file layout as the ai4bharat IndicTrans2 hub models.

Metrics (checkpoint step 6400)

Metric Value
Dev BLEU 58.33
Probe pass rate 23/26 (0.8846)

Training

Setting Value
Base model ai4bharat/indictrans2-indic-en-dist-200M
Direction npi_Devaeng_Latn
LoRA rank / alpha 16 / 32
Learning rate 0.0002

Usage

Load directly like any IndicTrans2 model:

import torch
from IndicTransToolkit import IndicProcessor
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model_id = "mostwise/nep-eng-indictrans2-v3-address"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForSeq2SeqLM.from_pretrained(
    model_id, trust_remote_code=True, attn_implementation="eager"
)
model.eval().to("cuda" if torch.cuda.is_available() else "cpu")

processor = IndicProcessor(inference=True)
src, tgt = "npi_Deva", "eng_Latn"

def translate(text: str) -> str:
    batch = processor.preprocess_batch([text], src_lang=src, tgt_lang=tgt, is_target=False)
    inputs = tokenizer(batch, return_tensors="pt", truncation=True, max_length=256).to(model.device)
    with torch.no_grad():
        out = model.generate(**inputs, max_length=256, num_beams=5, early_stopping=True, use_cache=False)
    return processor.postprocess_batch(
        tokenizer.batch_decode(out, skip_special_tokens=True), lang=tgt
    )[0]

print(translate("स्याङ्जा जिल्लामा विद्युत् आपूर्ति सुधारका लागि नम्बर के हो?"))

Limitations

Known residual failures on geo proper nouns (Dhanusha/Sakhuwa, Mirchaiya) and some colloquial phrasing.

Downloads last month
70
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support