Downloads · 30 days
4
4% of all-time downloads
Dasskp/nllb-kichwa-es-en
nllb-kichwa-es-en is a translation model from Dasskp. Use it when you need text moved from one language to another. The card lists the license as cc-by-nc-4.0.
Ajuste fino (fine-tuning) de facebook/nllb-200-distilled-600M para traduccion Espanol - Kichwa e Ingles - Kichwa, sobre un corpus trilingue de 4 365 pares.
Downloads · 30 days
4
4% of all-time downloads
All-time downloads
107
Public
Parameters
615M
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
Ajuste fino (fine-tuning) de facebook/nllb-200-distilled-600M para traduccion Espanol -> Kichwa e Ingles -> Kichwa, sobre un corpus trilingue de 4 365 pares.
| Direccion | BLEU | chrF2++ | ED-similitud |
|---|---|---|---|
| ES -> KI | 19.78 | 46.21 | 0.5815 |
| EN -> KI | 19.69 | 44.87 | 0.5641 |
from transformers import AutoModelForSeq2SeqLM, NllbTokenizer
REPO = "Dasskp/nllb-kichwa-es-en"
tokenizer = NllbTokenizer.from_pretrained(REPO)
model = AutoModelForSeq2SeqLM.from_pretrained(REPO)
def translate(text, src_lang, tgt_lang="ki_Latn"):
tokenizer.src_lang = src_lang
inputs = tokenizer(text, return_tensors="pt")
tgt_id = tokenizer.convert_tokens_to_ids(tgt_lang)
output = model.generate(**inputs, forced_bos_token_id=tgt_id)
return tokenizer.decode(output[0], skip_special_tokens=True)
print(translate("Buenos dias, hermano.", src_lang="spa_Latn"))
print(translate("Good morning, brother.", src_lang="eng_Latn"))