Downloads · 30 days
17
20% of all-time downloads
Agisight/nllb-rus-tyv-v3-dict_16.5k
nllb-rus-tyv-v3-dict_16.5k is a translation model from Agisight. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
Russian ↔ Tyvan (Tuvan) translation model. Fine-tuned from facebook/nllb-200-distilled-600M with an aggressively pruned vocabulary: from ~256k to 16.5k subword pieces (keeping only Russian/Tyvan tokens seen in the cor…
Downloads · 30 days
17
20% of all-time downloads
All-time downloads
86
Public
Parameters
370M
1.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.5 GB · 100%
From the Hugging Face model README
Russian ↔ Tyvan (Tuvan) translation model. Fine-tuned from facebook/nllb-200-distilled-600M with an aggressively pruned vocabulary: from ~256k to 16.5k subword pieces (keeping only Russian/Tyvan tokens seen in the corpus, plus Latin letters, digits, punctuation, and special tokens). This cuts the model from 615M to 370M parameters (−40%) while improving quality over the full-vocabulary baseline.
Tyvan language code: tyv_Cyrl (added; embedding initialized from Kyrgyz kir_Cyrl).
Russian: rus_Cyrl.
Evaluated on a held-out test set of 2,000 pairs (seed=42), identical for both systems.
| System | Vocab | Params | ru→tyv chrF++ | tyv→ru chrF++ | ru→tyv BLEU | tyv→ru BLEU |
|---|---|---|---|---|---|---|
| Full-vocab baseline | 256k | 615M | 48.12 | 47.50 | 19.00 | 23.01 |
| This model (pruned) | 16.5k | 370M | 48.50 | 48.11 | 19.79 | 23.20 |
The pruned model is smaller and slightly more accurate on all four metrics. chrF++ is the primary metric (character-level, more reliable than BLEU for agglutinative Turkic languages).
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "Agisight/nllb-rus-tyv-v3-dict_16.5k"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
def translate(text, src, tgt):
tok.src_lang = src
inputs = tok(text, return_tensors="pt")
out = model.generate(**inputs, forced_bos_token_id=tok.convert_tokens_to_ids(tgt),
max_new_tokens=128, num_beams=1)
return tok.batch_decode(out, skip_special_tokens=True)[0]
print(translate("Привет, как дела?", "rus_Cyrl", "tyv_Cyrl"))
print(translate("Экии!", "tyv_Cyrl", "rus_Cyrl"))
tyv_Cyrl added and initialized from kir_Cyrl.<unk> —
acceptable for the ru/tyv/Latin scenario it targets.If you use this model, please cite the dataset and base model (NLLB-200, Meta AI).