lunyoro-nllb_lun2en
Fine-tuned NLLB-200 model for Lunyoro/Rutooro β English translation.
Lunyoro-Rutooro is a Bantu language spoken by the Bunyoro-Kitara and Tooro kingdoms in western Uganda.
Model Details
- Base model:
facebook/nllb-200-distilled-600M - Fine-tuned on: ~53,948 English-Lunyoro sentence pairs
- Training: 10 epochs, AdamW optimizer, cosine LR schedule
- Hardware: NVIDIA GPU (CUDA)
- Source language code:
run_Latn - Target language code:
eng_Latn
Dataset
The training data was compiled from:
- Crowd-sourced word and sentence submissions
- Runyoro-Rutooro dictionary entries (Excel)
- Parallel sentence corpora
- Back-translation augmentation (~53,948 total pairs, quality-filtered)
Usage
from transformers import NllbTokenizer, AutoModelForSeq2SeqLM
model_name = "keithtwesigye/lunyoro-nllb_lun2en"
tokenizer = NllbTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
tokenizer.src_lang = "run_Latn"
text = "Oraire ota?"
inputs = tokenizer(text, return_tensors="pt", truncation=True)
output = model.generate(
**inputs,
forced_bos_token_id=tokenizer.convert_tokens_to_ids("eng_Latn"),
num_beams=4,
max_length=256
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Related Models
| Model | Description |
|---|---|
| lunyoro-en2lun | MarianMT English β Lunyoro |
| lunyoro-lun2en | MarianMT Lunyoro β English |
| lunyoro-nllb_en2lun | NLLB-200 English β Lunyoro |
| lunyoro-nllb_lun2en | NLLB-200 Lunyoro β English |
Full Application
Source code: chriskagenda/TRANSLATOR
- Downloads last month
- 174