Downloads · 30 days
9
23% of all-time downloads
alaminerca/nllb-sango-french
nllb-sango-french is a translation model from alaminerca. Use it when you need text moved from one language to another. It is set up for peft. The card lists the license as cc-by-4.0.
The first dedicated Sango-French neural machine translation system, directly addressing the "Sango Problem" identified by Meta's NLLB-200 project — the failure of massively multilingual scaling for a linguistically is…
Downloads · 30 days
9
23% of all-time downloads
All-time downloads
40
Public
Parameters
615M
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
The first dedicated Sango-French neural machine translation system, directly addressing the "Sango Problem" identified by Meta's NLLB-200 project — the failure of massively multilingual scaling for a linguistically isolated Creole language.
Paper: SangoNMT: Parameter-Efficient Domain Adaptation of NLLB-200 for Sango, an Isolated Creole Language (Submitted, 2026)
The NLLB-200 project (NLLB Team, 2022) identified Sango as a uniquely difficult outlier among Creole languages. In their analysis (Table 11), Sango was the only Creole language for which no similar high-resource language could be found to aid cross-lingual transfer training:
| Language | Bitext BLEU | Mined BLEU | xsim Error | Similar Language |
|---|---|---|---|---|
| Haitian Creole | 26.1 | 29.2 | Low | French |
| Nigerian Pidgin | 13.3 | 19.8 | Medium | English |
| Sango | 4.8 | 5.3 | 8.6% | None found |
Source: NLLB Team (2022), Table 11
This linguistic isolation — Sango is an Ubangian-derived creole with no closely related high-resource language — means that cross-lingual transfer strategies that benefit other low-resource languages simply do not work for Sango.
| Model / Configuration | BLEU | chrF++ | Training Data |
|---|---|---|---|
| NLLB-200-600M (our baseline, step 0) | 2.38 | 12.18 | — (zero-shot) |
| NLLB-200-600M + Sango-LoRA (ours) | 22.21 | 43.06 | 21,125 human-translated pairs |
Our Sango-LoRA achieves 22.21 BLEU on the in-domain Biblical test set — a dramatic improvement from the 2.38 step-0 baseline on the same domain.
To provide a fair cross-domain comparison, we also evaluated on the FLORES-200 benchmark:
| Model | Direction | BLEU | chrF++ |
|---|---|---|---|
| NLLB-200 (base) | fr → sg | 7.50 | 34.27 |
| NLLB-200 (base) | sg → fr | 7.01 | 25.15 |
| NLLB-200 (base) | Average | 7.25 | 29.71 |
| + Sango-LoRA | fr → sg | 6.76 | 32.92 |
| + Sango-LoRA | sg → fr | 6.35 | 25.60 |
| + Sango-LoRA | Average | 6.55 | 29.26 |
| Retention | 90.3% | 98.5% |
The fine-tuned model retains ~90% of BLEU and ~99% of chrF++ on the general domain, confirming that domain-specific fine-tuning does not catastrophically degrade general capability. The model is a domain specialist: it excels at Biblical/formal Sango while preserving most general translation ability.
| Model | BLEU | Data Size | Source |
|---|---|---|---|
| NLLB-200 (bitext only) | 4.8 | 282K mined | NLLB Team, Table 11 |
| NLLB-200 (bitext + mined) | 5.3 | 1.9M mined | NLLB Team, Table 11 |
Note: NLLB-200 scores are on the FLORES benchmark (general domain). Our in-domain score of 22.21 is on the Biblical test set. See the FLORES evaluation above for a same-benchmark comparison.
All translations verified by a native Sango speaker.
| French | Sango | Domain |
|---|---|---|
| Au commencement Dieu créa les cieux et la terre. | Na tongo nda ni, Nzapa asara yayu na sese. | Biblical |
| Tu aimeras le Seigneur ton Dieu de tout ton cœur. | Mo ye Kota Gbia Nzapa ti mo na be ti mo kue. | Biblical |
| Je suis satisfait du resultat. | Ye so asi anzere na mbi mingi. | Everyday |
| Sango | French | Domain |
|---|---|---|
| Na tongo nda ni, Nzapa asara yayu na sese. | Au commencement Dieu créa les cieux et la terre. | Biblical |
| Nzapa abaa so ye ni ayeke nzoni. | Et Dieu vit que cela était bon. | Biblical |
| So zo la! | C'est une personne! | Everyday |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_name = "alaminerca/nllb-sango-french"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# French → Sango
text = "Au commencement Dieu créa les cieux et la terre."
tokenizer.src_lang = "fra_Latn"
inputs = tokenizer(text, return_tensors="pt", max_length=256, truncation=True)
translated = model.generate(
**inputs,
forced_bos_token_id=tokenizer.convert_tokens_to_ids("sag_Latn"),
max_new_tokens=256,
num_beams=3
)
print(tokenizer.decode(translated[0], skip_special_tokens=True))
# Sango → French
text_sg = "Na tongo nda ni, Nzapa asara yayu na sese."
tokenizer.src_lang = "sag_Latn"
inputs = tokenizer(text_sg, return_tensors="pt", max_length=256, truncation=True)
translated = model.generate(
**inputs,
forced_bos_token_id=tokenizer.convert_tokens_to_ids("fra_Latn"),
max_new_tokens=256,
num_beams=3
)
print(tokenizer.decode(translated[0], skip_special_tokens=True))
import gradio as gr
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_name = "alaminerca/nllb-sango-french"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
def translate(text, direction):
if direction == "French → Sango":
tokenizer.src_lang = "fra_Latn"
tgt_id = tokenizer.convert_tokens_to_ids("sag_Latn")
else:
tokenizer.src_lang = "sag_Latn"
tgt_id = tokenizer.convert_tokens_to_ids("fra_Latn")
inputs = tokenizer(text, return_tensors="pt", max_length=256, truncation=True)
output = model.generate(**inputs, forced_bos_token_id=tgt_id, max_new_tokens=256, num_beams=3)
return tokenizer.decode(output[0], skip_special_tokens=True)
gr.Interface(fn=translate, inputs=["text", gr.Radio(["French → Sango", "Sango → French"])], outputs="text").launch()
Sango (ISO 639-3: sag) is the national language of the Central African Republic (CAR), spoken as a lingua franca by approximately 5.5 million people. It serves alongside French as an official language since 1991.
Sango is a creole-like language derived from Ngbandi (Ubangian language family). It spread along the Ubangi River as a trade language before European colonization. Key linguistic features include:
Despite its importance, Sango is virtually absent from NLP research — not represented in major benchmarks like MasakhaNER or AfriSenti, and with fewer than 300 Wikipedia articles.
| Parameter | Value |
|---|---|
| Base model | facebook/nllb-200-distilled-600M |
| Method | LoRA (Low-Rank Adaptation) |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | q_proj, v_proj |
| Trainable parameters | 2,359,296 / 617,433,088 (0.38%) |
| Training data | 21,125 pairs (42,250 bidirectional) |
| Epochs | 3 |
| Batch size | 4 per device × 8 gradient accumulation = 32 effective |
| Learning rate | 2e-4 (cosine schedule, 5% warmup) |
| Max sequence length | 256 tokens |
| Precision | FP16 (mixed) |
| Hardware | NVIDIA Tesla T4 (16 GB VRAM) |
| Training time | ~80 minutes |
SFPC (Sango-French Parallel Corpus) — the first quality-filtered, verse-aligned Sango-French parallel corpus.
@article{mouhamad2026sangonmt,
title={SangoNMT: Parameter-Efficient Domain Adaptation of NLLB-200 for Sango, an Isolated Creole Language},
author={Mouhamad, Alim Al-Amine and Alkhodre, Ahmad B. and Alsaawy, Yazed},
year={2026},
note={Submitted}
}
SangoNMT est le premier système dédié de traduction automatique neuronale Sango-Français. Il résout le « problème Sango » identifié par le projet NLLB-200 de Meta — Sango étant la seule langue créole pour laquelle aucune langue à haute ressource similaire n'a pu être trouvée.
En utilisant seulement 21 125 paires de traduction humaine de haute qualité issues de la Bible, nous obtenons 22,21 BLEU sur l'évaluation en domaine grâce à l'adaptation LoRA de seulement 0,38% des paramètres du modèle. Notre évaluation sur FLORES-200 montre que le modèle conserve environ 90% de sa capacité générale tout en acquérant une expertise de domaine spécialisée.
Alim Al-Amine Mouhamad — Department of Computer Science, Islamic University of Madinah, KSA
Ahmad B. Alkhodre — Department of Computer Science, Islamic University of Madinah, KSA
Yazed Alsaawy — Department of Computer Science, Islamic University of Madinah, KSA
This model is released as a research contribution to advance NLP for underserved African languages. We welcome community feedback and collaboration.