Roman to Nepali MBart50

This is a fine-tuned MBart50 model that translates Romanized Nepali text into Nepali (Devanagari script).

Model Details

Model Description

This model is fine-tuned on 500 Roman → Nepali sentence pairs using the facebook/mbart-large-50 base model.
It is intended for educational and fun NLP projects, allowing conversion of Romanized Nepali text into proper Nepali script.

  • Developed by: rajeshrai
  • Model type: MBart50
  • Language(s): Romanized Nepali → Nepali (ne_NP)
  • License: MIT (or your preferred license)
  • Fine-tuned from: facebook/mbart-large-50

Model Sources

Uses

Direct Use

  • Translate Romanized Nepali text to Nepali (Devanagari) for educational purposes, chatbots, or small-scale projects.

Out-of-Scope Use

  • This model is not suitable for professional translation or large-scale production as it is trained on only 500 sentence pairs.
  • It may produce inaccurate translations for complex or long sentences.

Bias, Risks, and Limitations

  • Trained on a small dataset, so coverage is limited.
  • Might struggle with slang, rare words, or long sentences.
  • Outputs should be reviewed by a human for critical use.

How to Get Started

from transformers import MBartForConditionalGeneration, MBart50TokenizerFast

model_name = "rajeshrai577/roman-to-nepali-mbart50"

model = MBartForConditionalGeneration.from_pretrained(model_name)
tokenizer = MBart50TokenizerFast.from_pretrained(model_name, src_lang="en_XX", tgt_lang="ne_NP")

input_text = "translate Roman Nepali to Nepali: ma ghar jaanchu."
inputs = tokenizer(input_text, return_tensors="pt")
generated_ids = model.generate(
    **inputs,
    forced_bos_token_id=tokenizer.lang_code_to_id["ne_NP"],
    max_length=50
)
print(tokenizer.decode(generated_ids[0], skip_special_tokens=True))
# Output: म घर जान्छु।
Downloads last month
21
Safetensors
Model size
0.6B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support