Uyari · Shawi ↔ Spanish, English, French, German, Italian, Portuguese (NLLB-200 distilled 1.3B)
Translation between Shawi (Chayahuita, ISO 639-3 cbt) and Spanish, English, French, German, Italian and Portuguese, in all 12 directions. A full fine-tune of facebook/nllb-200-distilled-1.3B that adds Shawi as a new language, cbt_Latn. Part of Uyari, an open toolkit, data and models for translation between Indigenous and official languages.
Version v0.3 (mt-cbt-nllb1.3b@v0.3 in Uyari), trained 2026-11-03 on build data-2026.11-six. The other Uyari model for Shawi: malexandersalazar/uyari-mt-cbt-glimmer30b-qlora (Muse Glimmer 30B, Apache 2.0).
Usage
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
repo = "malexandersalazar/uyari-mt-cbt-nllb1.3b"
device = "cuda" if torch.cuda.is_available() else "cpu"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSeq2SeqLM.from_pretrained(
repo, dtype=torch.bfloat16 if device == "cuda" else torch.float32).to(device).eval()
def translate(text, src, tgt):
if src == "cbt_Latn":
text = text.replace("ʼ", "'")
tok.src_lang = src
inputs = tok(text, return_tensors="pt").to(device)
out = model.generate(**inputs, forced_bos_token_id=tok.convert_tokens_to_ids(tgt), num_beams=4)
result = tok.decode(out[0], skip_special_tokens=True)
return result.replace("'", "ʼ") if tgt == "cbt_Latn" else result
print(translate("El niño tiene fiebre desde ayer.", "spa_Latn", "cbt_Latn"))
Language codes: cbt_Latn (Shawi), spa_Latn (Spanish), eng_Latn (English), fra_Latn (French), deu_Latn (German), ita_Latn (Italian), por_Latn (Portuguese).
Shawi writes its glottal stop as ʼ (U+02BC), which NLLB's vocabulary does not have: the model reads and writes ' instead, so map it at the edges as above.
Results
chrF++ on the test split, scored once when this version was promoted (322 sentences per direction).
| Into Shawi | From Shawi | |
|---|---|---|
| Spanish | 43.2 | 45.8 |
| English | 43.3 | 45.5 |
| French | 43.1 | 46.3 |
| German | 42.6 | 44.1 |
| Italian | 43.2 | 44.7 |
| Portuguese | 43.3 | 43.0 |
The retrieval floor, the human translation of the most similar training sentence, scores 21.6–23.9 in every direction. The English, French, German, Italian and Portuguese references are machine translations of the Spanish, and no Shawi speaker has rated the output yet. Validation and test per direction, with BLEU and the floor: full model card.
Training
- Data: 3,575 human Shawi translations of Spanish sentences in four everyday domains, from 3 contributions (CC BY 4.0). The Spanish sentences are synthetic, written by language models from a fixed design matrix; the other five languages are machine translations of the Spanish.
- Splits by paraphrase group, so no paraphrase of a test sentence is in training.
- Full fine-tune, 6,582 steps; the
cbt_Latnembedding starts from Ayacucho Quechua (quy_Latn). - Recipe
cbt.mt.nllb-1.3b, builddata-2026.11-six.
Limitations
- About 3,600 sentence pairs, one variety (unspecified), four everyday domains. Health and civic language is thin (puente_civico has the fewest pairs).
- No Shawi recordings exist yet: this model is text only, and Shawi speech recognition in the demo is unmeasured.
- Output must be checked by a Shawi speaker before any use in health, legal or civic settings.
Intended use
Communication access, education and language revitalization. Not for surveillance, targeting or profiling of speakers.
License
- Weights: CC BY-NC 4.0, inherited from the base model. Non-commercial: for commercial use, see
malexandersalazar/uyari-mt-cbt-glimmer30b-qlora(Apache 2.0). - Training data: CC BY 4.0 (
DATA_LICENSE.md). If you build on this model, say it comes from Uyari and link the repository (NOTICE). - A community or a contributor can withdraw their data (governance): later versions leave it out and this card says so.
Citation
@software{uyari2026,
author = {Alexander Salazar},
title = {Uyari: open toolkit, data and models for translation between Indigenous and official languages},
year = {2026},
url = {https://github.com/malexandersalazar/uyari}
}