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
Spanish โ Isthmus Zapotec (Diidxazรก) Experimental 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.
This is a side result of the main project called Didxazapp.
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")
def generate_text(text: str) -> str:
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, num_beams=4, max_length=96)
return tok.batch_decode(out, skip_special_tokens=True)[0]
generate_text("quiero ver tu risa todo el dia")
You can use the onnx version of the model directly in your browser here: https://huggingface.co/spaces/simpleverso/espzap-translator
Results
Trained on 18,452 unique parallel pairs.
| Metric | Dev (best epoch) | Test (held-out) |
|---|---|---|
| chrF | 42.1 | 37.7 |
| BLEU | 9.7 | 6.4 |
Models output:
- Safetensor
- Onnx
Limitations
- Trained on ~18.5k pairs; usable but imperfect. There is no standarized zapotec information, Im working to build one.
- Part of the training data 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.
Author
Gonzalo Santiago Martinez
Disclaimer:
Any translation is provided for convenience only. The author makes no warranty of any kind, express or implied, as to the accuracy, reliability, or correctness of any translations. Any reliance on the translated text is at the user's own risk. The author are not liable for any harm, loss, or damage resulting from the use of or reliance on this translation tool.
- Downloads last month
- 119
Model tree for simpleverso/espzap-nllb-600m
Base model
facebook/nllb-200-distilled-600M