Instructions to use Flaglab/nllb-600M-kamentsa-esp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Flaglab/nllb-600M-kamentsa-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-kamentsa-esp")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Flaglab/nllb-600M-kamentsa-esp") model = AutoModelForSeq2SeqLM.from_pretrained("Flaglab/nllb-600M-kamentsa-esp") - Notebooks
- Google Colab
- Kaggle
NLLB-200 600M Spanish ↔ Kamëntsá
Neural machine translation between Spanish and Kamëntsá, a Colombian Indigenous language (Kamëntsá people, Sibundoy Valley, Putumayo). The model is bidirectional: it translates Spanish to Kamëntsá and Kamëntsá 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).
Languages
| Role | Language | Tokenizer code | ISO 639-3 |
|---|---|---|---|
| Source / target | Spanish | spa_Latn |
spa |
| Source / target | Kamëntsá | kam_Latn |
kbh |
Results
SacreBLEU and chrF2 on the held-out test partition.
| Direction | BLEU | chrF2 |
|---|---|---|
| Spanish to Kamëntsá | 6.36 | 27.72 |
| Kamëntsá to Spanish | 4.31 | 22.95 |
Usage
from transformers import AutoModelForSeq2SeqLM, NllbTokenizer
tok = NllbTokenizer.from_pretrained("Flaglab/nllb-600M-kamentsa-esp")
model = AutoModelForSeq2SeqLM.from_pretrained("Flaglab/nllb-600M-kamentsa-esp")
# Spanish to Kamëntsá
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("kam_Latn"))
print(tok.batch_decode(out, skip_special_tokens=True))
Training
- Base model: facebook/nllb-200-distilled-600M
- Strategy: Expanded bilingual corpus (full variant).
- Tokenizer: NLLB SentencePiece extended with a custom Kamëntsá vocabulary.
License and intended use
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.
- Downloads last month
- 24
Model tree for Flaglab/nllb-600M-kamentsa-esp
Base model
facebook/nllb-200-distilled-600M