🇬🇭 Ghanaian Asante Twi ↔ English AI Translator (V2)
Production-grade bilingual neural machine translation model between English and Asante Twi (Akan). Fine-tuned on 457,000+ parallel sentences from the Ghana Open Knowledge corpus with conversational alignment.
🚀 Key Highlights
- Natural Conversational Asante Twi: Produces authentic idioms ("Wo ho te sɛn?", "Merekɔ gua so akɔtɔ aduane", "Mente nea woreka no ase").
- Zero Token Loops: Resolves NLLB repetition bugs and literal word-for-word translation artifacts.
- Bidirectional: Supports both English ➔ Asante Twi and Asante Twi ➔ English.
- Voice TTS Pairing: Designed to work directly with the native Twi voice synthesis model techolise/akan-twi-speaker17-tts-v3.
💻 Quick Usage
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "techolise/nllb-english-twi-finetuned-v2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
text = "I am going to the market to buy food."
tokenizer.src_lang = "eng_Latn"
inputs = tokenizer(text, return_tensors="pt")
tgt_id = tokenizer.convert_tokens_to_ids("twi_Latn")
outputs = model.generate(**inputs, forced_bos_token_id=tgt_id, max_length=150)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: Merekɔ gua so akɔtɔ aduane.
📊 Benchmark Comparison
| English Input | Base NLLB Output | V2 Finetuned Output |
|---|---|---|
| "Hello, how are you today?" | Akwaaba, wote dɛn nnɛ? | Akwaaba, wo ho te sɛn nnɛ? |
| "I am going to the market to buy food." | Mɛkɔ gua so akɔtɔ aduan. | Merekɔ gua so akɔtɔ aduane. |
| "Good morning, how are you?" | Anɔpa pa, wo ho te dɛn? | Wo ho te sɛn? |
| "I don't understand what you are saying." | Menhu nea woreka no. | Mente nea woreka no ase. |
| "What are you doing right now?" | Dɛn na woreyɛ seesei? | Dɛn na woreyɛ seesei yi? |