NLLB Runyoro-English Translation (Fine-tuned)
Fine-tuned version of facebook/nllb-200-distilled-600M for Runyoro-English
translation, primarily in the Runyoro -> English direction.
Important limitation: language code proxy
NLLB-200 has no dedicated language code for Runyoro, Rutooro, Nyankole, or
Kiga (the Runyakitara language cluster). This model uses lug_Latn (Ganda)
as the closest available proxy tag during training and inference, since
Runyoro and Luganda share a common Great Lakes Bantu ancestor.
Practical effect:
- Runyoro -> English works reasonably well (this is the validated, recommended direction). Test set BLEU: 22.39.
- English -> Runyoro is unreliable. Because the target tag is a proxy, not a real Runyoro code, generation in this direction tends to produce genuinely Luganda-shaped text (distinct orthography: geminated consonants, different vocabulary) rather than Runyoro. This direction is not recommended for production use without further work (e.g. extending the tokenizer with a dedicated Runyoro token and retraining).
Training data
- ~5,600 Runyoro-English sentence pairs (custom dataset), split 64/16/20 train/validation/test.
- Mix of templated professional-register sentences and conversational sentences; conversational/greeting-style coverage is comparatively thin, so performance on short everyday phrases can be inconsistent.
Usage
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
model = AutoModelForSeq2SeqLM.from_pretrained("melvin127/Kathay_eng_runy")
tokenizer = AutoTokenizer.from_pretrained("melvin127/Kathay_eng_runy")
RUNYORO_LANG = "lug_Latn" # proxy tag, see limitation above
ENGLISH_LANG = "eng_Latn"
def translate_runyoro_to_english(text):
tokenizer.src_lang = RUNYORO_LANG
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
outputs = model.generate(
**inputs, max_length=128, num_beams=4,
forced_bos_token_id=tokenizer.convert_tokens_to_ids(ENGLISH_LANG)
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(translate_runyoro_to_english("Ninkusiima munonga"))
Known weaknesses
- Short idiomatic greetings not well represented in training data may translate incorrectly.
- Rare vocabulary (specific professions, uncommon nouns) can be confused with more frequent nearby words seen during training.
- English -> Runyoro generation should be treated as experimental only.
- Downloads last month
- -
Model tree for melvin127/Kathay_eng_runy
Base model
facebook/nllb-200-distilled-600M