Downloads · 30 days
480
25% of all-time downloads
galsenai/wolofToFrenchTranslator_nllb
wolofToFrenchTranslator_nllb is a machine learning model from galsenai. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
[](https://huggingface.co/galsenai/wolofToFrenchTranslatornllb)
Downloads · 30 days
480
25% of all-time downloads
All-time downloads
2K
Public
Parameters
615M
2.5 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
This is a Wolof ↔ French translation model based on Meta AI’s NLLB (No Language Left Behind) architecture, fine-tuned specifically for high-quality bilingual translation in both directions.
🧠 Developed by GalsenAI, a Senegal-based open initiative promoting artificial intelligence for African languages.
facebook/nllb-200-distilled-600Mwo) ↔ French (fr)pip install transformers torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
checkpoint = "galsenai/wolofToFrenchTranslator_nllb"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint).to(device)
def predict(text, lang):
if lang.lower() == "wo":
prefix = "translate Wolof to French: "
elif lang.lower() == "fr":
prefix = "translate French to Wolof: "
else:
raise ValueError("Invalid language code")
inputs = tokenizer(prefix + text, return_tensors="pt").to(device)
translated_tokens = model.generate(**inputs, max_length=30)
return tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
# Example
result = predict("Naka nga def?", lang="wo")
print(result) # "Comment ça va?"
| Translation Direction | BLEU Score |
|---|---|
| Wolof → French | 13 |
| French → Wolof | 13 |
Note: BLEU score is an indicator of translation quality. Further training will improve results.
The model was fine-tuned using a mix of:
This model is maintained by GalsenAI.
If you’d like to:
👉 Join us at github.com/GalsenAI or reach out to the team!
MIT License — free to use for research, education, and social applications. 📣 Attribution requested: GalsenAI (2025)