AfriSpeech/afrigloss-opus-mt-fr-yo 🌍
AfriSpeech/afrigloss-opus-mt-fr-yo is a production glossary-constrained machine translation model for French $\rightarrow$ Yoruba, fine-tuned under the Afri-Gloss-MT framework.
Part of the Afri-Gloss-MT Models Collection.
🌟 Key Capabilities
- Zero-Shot Terminology Control: The model accepts user-injected or dictionary-matched target terms in angle brackets (
<target_term>) inside the source sentence, and reliably preserves them in the generated translation. - Trained to Convergence on Full Bitext: Fine-tuned on full multi-version parallel corpora from
AfriSpeech/africa-corpusandAfriSpeech/african-corpus-jwwith 100% verified in-place noun-chunk replacements. - High-Performance Inference: Built on MarianMT for fast, lightweight CPU and GPU deployment.
🚀 Quickstart & Inference
Python (Hugging Face transformers)
from transformers import MarianMTModel, MarianTokenizer
model_name = "AfriSpeech/afrigloss-opus-mt-fr-yo"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)
# 1. Plain source sentence with in-place target glossary insertion
prompt = "The <ọba> gave <ọgbọ́n> and <òtítọ́> to the people."
inputs = tokenizer(prompt, return_tensors="pt", padding=True)
translated_tokens = model.generate(**inputs, max_length=128, num_beams=4)
translation = tokenizer.decode(translated_tokens[0], skip_special_tokens=True)
print("Output Translation:", translation)
# Output preserves the injected terms fluently!
📊 Dataset Reference
This model was trained on the yor subset of the official dataset:
- Dataset Repository: AfriSpeech/gloss-mt-train-fr
- Subset Name:
"yo"
⚖️ License
This model is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC-BY-NC 4.0) license.
📚 Citation
@article{owusu2026afrigloss,
title={Afri-Gloss-MT: In-Place Glossary Constraints for African Machine Translation},
author={Owusu, Mich-Seth},
journal={arXiv preprint},
year={2026}
}