Instructions to use simpleverso/espzap-nllb-600m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use simpleverso/espzap-nllb-600m 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="simpleverso/espzap-nllb-600m")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("simpleverso/espzap-nllb-600m") model = AutoModelForSeq2SeqLM.from_pretrained("simpleverso/espzap-nllb-600m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
license: cc-by-nc-4.0
language:
- es
- zap
pipeline_tag: translation
tags:
- translation
- nllb
- zapotec
- diidxaza
- low-resource
base_model: facebook/nllb-200-distilled-600M
library_name: transformers
Spanish → Isthmus Zapotec (diidxazá) translator
Neural machine translation from Spanish (spa_Latn) into Isthmus Zapotec
(diidxazá), built by LoRA fine-tuning
facebook/nllb-200-distilled-600M
and merging the adapter back into the base for a standalone model.
Isthmus Zapotec is not covered by any pretrained MT model, so an existing NLLB
language slot (ayr_Latn) is reused as the Zapotec output tag. Every training
target is Zapotec, so the model fully repurposes that tag. The forced target tag
is stored in generation_config.json (forced_bos_token_id), so generation
needs no special setup.
Usage
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "simpleverso/espzap-nllb-600m"
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
tok = AutoTokenizer.from_pretrained(model_id, src_lang="spa_Latn")
inputs = tok("Buenos días, ¿cómo estás?", return_tensors="pt")
out = model.generate(**inputs, num_beams=4, max_length=96)
print(tok.batch_decode(out, skip_special_tokens=True)[0])
Results
Trained for 6 epochs on 18,452 unique parallel pairs.
| Metric | Dev (best epoch) | Test (held-out) |
|---|---|---|
| chrF | 42.1 | 37.7 |
| BLEU | 9.7 | 6.4 |
chrF is the more meaningful metric: Zapotec is morphologically rich, and
character-level scoring rewards correct aspect prefixes (hr-, bi-, na-) and
person suffixes (-lu', -tu', -a').
Limitations
- Trained on ~18.5k pairs; usable but imperfect.
- Part of the training data (a poems PDF) is unreviewed, so some outputs may reflect noise in that source.
- Handles everyday sentences best; long or highly literary input degrades.
License
The base model NLLB-200 is released under CC-BY-NC-4.0; this derivative inherits that non-commercial license.