Machine Translation for Colombian Indigenous Languages
Collection
NLLB-200 fine-tunes for Spanish and Colombian Indigenous languages: Wayuunaiki, Inga, Kamëntsá, Nasa Yuwe. FLAG Lab thesis. • 5 items • Updated
How to use Flaglab/nllb-600M-nasayuwe-esp 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="Flaglab/nllb-600M-nasayuwe-esp", device_map="auto") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Flaglab/nllb-600M-nasayuwe-esp")
model = AutoModelForSeq2SeqLM.from_pretrained("Flaglab/nllb-600M-nasayuwe-esp", device_map="auto")Neural machine translation between Spanish and Nasa Yuwe, a Colombian Indigenous language (Nasa people, Cauca). The model is bidirectional: it translates Spanish to Nasa Yuwe and Nasa Yuwe to Spanish.
Fine-tune of facebook/nllb-200-distilled-600M from the thesis Data-Centric Strategies for Low-Resource Neural Machine Translation in Colombian Indigenous Languages (Universidad de los Andes, FLAG Lab).
| Role | Language | Tokenizer code | ISO 639-3 |
|---|---|---|---|
| Source / target | Spanish | spa_Latn |
spa |
| Source / target | Nasa Yuwe | nas_Latn |
pbb |
SacreBLEU and chrF2 on the held-out test partition.
| Direction | BLEU | chrF2 |
|---|---|---|
| Spanish to Nasa Yuwe | 3.37 | 18.37 |
| Nasa Yuwe to Spanish | 2.56 | 17.69 |
from transformers import AutoModelForSeq2SeqLM, NllbTokenizer
tok = NllbTokenizer.from_pretrained("Flaglab/nllb-600M-nasayuwe-esp")
model = AutoModelForSeq2SeqLM.from_pretrained("Flaglab/nllb-600M-nasayuwe-esp")
# Spanish to Nasa Yuwe
tok.src_lang = "spa_Latn"
inputs = tok("Buenos días, ¿cómo estás?", return_tensors="pt")
out = model.generate(**inputs, forced_bos_token_id=tok.convert_tokens_to_ids("nas_Latn"))
print(tok.batch_decode(out, skip_special_tokens=True))
Released under CC-BY-NC 4.0, inherited from NLLB-200: non-commercial use only. Intended for research on machine translation for Colombian Indigenous languages. Outputs have not been validated by human speakers.
Base model
facebook/nllb-200-distilled-600M