Downloads · 30 days
10
6% of all-time downloads
techolise/nllb-english-twi-finetuned-v2
nllb-english-twi-finetuned-v2 is a translation model from techolise. Use it when you need text moved from one language to another. The card lists the license as cc-by-nc-4.0.
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.
Downloads · 30 days
10
6% of all-time downloads
All-time downloads
156
Public
Parameters
1.4B
8.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.8 GB · 99%
From the Hugging Face model README
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.
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.
| 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? |