nllb-fr-fon-v1 — Traduction français ↔ fon (Fongbé), int8 (v6)
Modèle de traduction automatique bidirectionnel français ↔ fon, obtenu par fine-tuning de NLLB-200-distilled-600M sur le corpus enrichi (63 458 paires générales + 1 126 paires d'or validées manuellement incluant le domaine santé fon-sante-nlu, les montants CFA, les fruits locaux et les fonctions administratives), puis quantifié en int8 (format CTranslate2, 591.0 Mo, ultra-rapide sur CPU).
Auteur : AWADEME Ronaldo — Finanfa Tech
🇬🇧 English summary: French ↔ Fon (Fongbe, Benin) machine-translation model, fine-tuned from NLLB-200-distilled-600M and quantized to int8 (CTranslate2, CPU-friendly). Non-commercial license (CC-BY-NC-4.0, inherited from NLLB-200). High-precision native & medical corrections integrated.
Utilisation
pip install ctranslate2 transformers sentencepiece huggingface_hub
import ctranslate2
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer
path = snapshot_download("finanfa-tech/nllb-fr-fon-v1")
translator = ctranslate2.Translator(path, device="cpu") # ou device="cuda"
tokenizer = AutoTokenizer.from_pretrained(path)
def translate(text, src_lang, tgt_lang):
tokenizer.src_lang = src_lang
tokens = tokenizer.convert_ids_to_tokens(tokenizer.encode(text))
result = translator.translate_batch([tokens], target_prefix=[[tgt_lang]], beam_size=4, max_decoding_length=96)
return tokenizer.decode(tokenizer.convert_tokens_to_ids(result[0].hypotheses[0][1:]), skip_special_tokens=True)
print(translate("Le ministre est venu ici.", "fra_Latn", "fon_Latn")) # français -> fon
print(translate("yě jɛ kpo", "fon_Latn", "fra_Latn")) # fon -> français
Évaluation (Jeu de test de 1 000 paires avec sacrebleu)
| Modèle | fr→fon chrF++ | fr→fon BLEU | fon→fr chrF++ | fon→fr BLEU |
|---|---|---|---|---|
| NLLB-200-distilled-600M (baseline zero-shot) | 26.52 | 8.12 | 28.91 | 8.12 |
| nllb-fr-fon-v1, int8 (v6) | 50.78 | 30.88 | 58.24 | 39.03 |