Translation
Transformers
Safetensors
Bambara
French
m2m_100
text2text-generation
bambara
french
environment
wash
mali
map-action
Instructions to use Map-Action/nllb600-bm-fr-map-action-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Map-Action/nllb600-bm-fr-map-action-v2 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="Map-Action/nllb600-bm-fr-map-action-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Map-Action/nllb600-bm-fr-map-action-v2") model = AutoModelForSeq2SeqLM.from_pretrained("Map-Action/nllb600-bm-fr-map-action-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Bambara → French translation for voice reports (Map Action, v2)
Translates Bambara, including the imperfect output of a speech recogniser, into French. Fine-tuned by
Map Action from
facebook/nllb-200-distilled-600M.
License: CC-BY-NC-4.0, inherited from NLLB-200. This is not an open license under the Digital Public Goods
standard. We tried the Apache-licensed google/madlad400-3b-mt with LoRA on the same data: it reached BLEU 3.4 only.
Finding an openly licensed base that works for Bambara is open work.
Results
BLEU and chrF (sacrebleu), lower-cased, punctuation removed. Higher is better.
| Test set | Pairs | NLLB-600M as released | v1 (open corpus) | v2 (this model) |
|---|---|---|---|---|
Open corpus, RobotsMali/bam-asr-early test |
500 | BLEU 1.7 / chrF 20.6 | 22.1 / 46.4 | 21.5 / 46.1 |
| Map Action reports, from corrected Bambara text | 16 | — | 4.5 / 32.3 | 40.5 / 57.8 |
| Map Action reports, from speech (ASR output) | 16 | — | 5.1 / 33.9 | 41.4 / 57.8 |
For reference, NLLB-1.3B scores BLEU 2.7 and MADLAD-400-3B scores 0.7 on the open-corpus test, without fine-tuning.
Training
- v1, general Bambara. 3 epochs on 35,719 Bambara–French pairs from
RobotsMali/bam-asr-early(CC-BY-4.0), batch 32, learning rate 1e-4, 13 minutes on one A40. - v2, domain adaptation. 900 more steps at 5e-5 on 204 Map Action pairs (each report once with its human-corrected Bambara text and once with what the speech recogniser actually heard, so the model tolerates recognition errors), weighted ×20, mixed with 6,000 general pairs.
Limitations, please read
- The BLEU of 41 on Map Action reports is optimistic. The reports share recurring endings (place, landmark, duration: "I am in Koro, behind the school"). The model now renders those very well, which lifts BLEU. The core of the message, the problem being reported, is still wrong in roughly half of the test sentences.
- The French references are the prompts speakers were given, not word-for-word translations of what they said.
- A fluent but wrong translation is more misleading than a hesitant transcript: always show the result as "automatic translation" and keep the original audio one click away.
Usage
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Map-Action/nllb600-bm-fr-map-action-v2", src_lang="bam_Latn", tgt_lang="fra_Latn")
model = AutoModelForSeq2SeqLM.from_pretrained("Map-Action/nllb600-bm-fr-map-action-v2")
x = tok("ɲamantonba dɔ bɛ sugu kɔfɛ", return_tensors="pt")
y = model.generate(**x, forced_bos_token_id=tok.convert_tokens_to_ids("fra_Latn"), num_beams=4, max_new_tokens=128)
print(tok.batch_decode(y, skip_special_tokens=True)[0])
- Downloads last month
- 30
Model tree for Map-Action/nllb600-bm-fr-map-action-v2
Base model
facebook/nllb-200-distilled-600M