Kreol Morisien β†’ Bhojpuri Morisien (Romanized) Translator

Model Description

This repository contains a fine-tuned multilingual sequence-to-sequence translation model built using Hugging Face Transformers. It translates Kreol Morisien (Latin script) to Bhojpuri Morisien (romanized, Latin script).

Language Pair

  • Source (NLLB tag): mfe_Latn
  • Target (NLLB tag): bho_Latn

Fixed Decoding Configuration (IMPORTANT)

All evaluations and demos use the same decoding configuration:

  • num_beams = 6
  • no_repeat_ngram_size = 3
  • length_penalty = 1.0
  • max_length = 96
  • early_stopping = True

Language forcing:

  • tokenizer.src_lang = "mfe_Latn"
  • tokenizer.tgt_lang = "bho_Latn"
  • forced_bos_token_id = tokenizer.convert_tokens_to_ids("bho_Latn")

Evaluation

Metrics computed using sacrebleu on a fixed test split:

  • BLEU: 38.55
  • chrF: 58.89

Usage Example

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

repo_id = "harshbheem/kreol-bhojpuri-translator"

tokenizer = AutoTokenizer.from_pretrained(repo_id, use_fast=False)
model = AutoModelForSeq2SeqLM.from_pretrained(repo_id)

tokenizer.src_lang = "mfe_Latn"
tokenizer.tgt_lang = "bho_Latn"
tgt_id = tokenizer.convert_tokens_to_ids("bho_Latn")

decode_kwargs = dict(
    num_beams=6,
    no_repeat_ngram_size=3,
    length_penalty=1.0,
    max_length=96,
    early_stopping=True,
    forced_bos_token_id=tgt_id,
)

text = "mo pe al lekol"
inputs = tokenizer(text, return_tensors="pt")

with torch.inference_mode():
    output = model.generate(**inputs, **decode_kwargs)

print(tokenizer.decode(output[0], skip_special_tokens=True))

Limitations

  • Output quality depends on training data coverage and consistency.
  • This is a research prototype for academic demonstration; it may produce grammatical errors.
  • CPU inference (e.g., free Spaces) may be slower than GPU.

Citation

Harsh Bheem. (2026). Kreol Morisien β†’ Bhojpuri Morisien Neural Machine Translation (Undergraduate dissertation project).

Downloads last month
10
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

Space using harshbheem/kreol-bhojpuri-translator 1