Skip to page content
SAVRN
Search Plan a project

Open-weight model · Translation

tyv-gemma4-e4b-lora

by Ali Kuzhuget Agisight/tyv-gemma4-e4b-lora

tyv-gemma4-e4b-lora is an open-weight model for translation from Ali Kuzhuget, released under Apache License 2.0. Its published files total 311.3 MB.

LoRA adapter for google/gemma-4-E4B-it fine-tuned for bidirectional Russian ↔ Tuvan translation. Tuvan is a low-resource Turkic language with roughly 280,000 speakers.

Parameters—
Context—
Weights279.1 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Ali Kuzhuget, published under apache-2.0, revision 61a7dc472764.

LoRA adapter for google/gemma-4-E4B-it fine-tuned for bidirectional Russian ↔ Tuvan translation. Tuvan is a low-resource Turkic language with roughly 280,000 speakers. On the clean held-out test set this adapter significantly outperforms the specialized translation model Agisight/nllb-rus-tyv-v3-dict16.5k (NLLB-200-distilled-600M fine-tuned on the same data) in both directions and on every metric. Clean test set — 1,369 pairs. The held-out test split used for NLLB v3 (shuffle(seed=42), pairs 2000–4000 of Agisight/tyv-rus-200k), with pairs whose Tuvan or Russian side also appears in training removed. Greedy decoding, same length limit as NLLB (32 + 3 × input length new tokens). Full NLLB…

Read Ali Kuzhuget's full model card

Gemma 4 E4B — Russian ↔ Tuvan translation (LoRA)

LoRA adapter for google/gemma-4-E4B-it fine-tuned for bidirectional Russian ↔ Tuvan translation. Tuvan is a low-resource Turkic language with roughly 280,000 speakers.

On the clean held-out test set this adapter significantly outperforms the specialized translation model Agisight/nllb-rus-tyv-v3-dict_16.5k (NLLB-200-distilled-600M fine-tuned on the same data) in both directions and on every metric.

Results

Clean test set — 1,369 pairs. The held-out test split used for NLLB v3 (shuffle(seed=42), pairs 2000–4000 of Agisight/tyv-rus-200k), with pairs whose Tuvan or Russian side also appears in training removed. Greedy decoding, same length limit as NLLB (32 + 3 × input length new tokens).

Metric NLLB v3 This adapter Δ p (paired bootstrap)
chrF++ ru→tyv 49.2 50.5 +1.3 0.009
chrF++ tyv→ru 49.1 50.9 +1.8 0.001
BLEU ru→tyv 19.8 20.9 +1.1 0.042
BLEU tyv→ru 23.5 26.2 +2.7 0.002
Normalized chrF++ ru→tyv ¹ 49.0 49.9 +0.9 —
Normalized chrF++ tyv→ru ¹ 53.1 54.6 +1.5 —
COMET tyv→ru ² 0.806 0.827 +0.021 —

Full NLLB test set — 1,999 pairs (comparable with the NLLB v3 model card): chrF++ 49.7 / 49.9 (ru→tyv / tyv→ru) vs. NLLB v3 48.5 / 48.1.

¹ Normalization forgives acceptable variation: for Russian output, words are lemmatized and 3rd-person pronouns merged (Tuvan has no grammatical gender, so «он»/«она» is ambiguous); for Tuvan output, subject pronouns are dropped (person is marked on the verb). ² Unbabel/wmt22-comet-da; reported for tyv→ru only, since COMET's encoder does not cover Tuvan.

Prompt format

The adapter was trained on single-turn chat messages with a short prefix:

  • Russian → Tuvan: ru→tyv: <Russian text>
  • Tuvan → Russian: tyv→ru: <Tuvan text>

Use exactly this format; other instructions were not seen in training.

Usage

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

base_id, adapter_id = "google/gemma-4-E4B-it", "Agisight/tyv-gemma4-e4b-lora"
tok = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(base_id, dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, adapter_id).eval()

def translate(text, direction="ru→tyv"):
    prompt = tok.apply_chat_template([{"role": "user", "content": f"{direction}: {text}"}],
                                     add_generation_prompt=True, tokenize=False)
    enc = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
    out = model.generate(**enc, max_new_tokens=32 + 3 * enc.input_ids.shape[1], do_sample=False)
    return tok.decode(out[0, enc.input_ids.shape[1]:], skip_special_tokens=True).strip()

print(translate("Завтра я поеду в Кызыл к родителям."))
print(translate("Экии!", "tyv→ru"))

Training

  • Data: Agisight/tyv-rus-200k, NLLB v3 split; 272,704 training pairs after cleaning, used in both directions — 543,616 examples. Pairs longer than 300 characters were dropped.
  • Method: LoRA (r = 32, α = 64, dropout 0.05) on all attention and MLP projections of the language model only — 258 layers, 69.8M trainable parameters (0.87%). Vision and audio towers are untouched. Loss on the translation (completion) tokens only.
  • Hyperparameters: 1 epoch (8,494 steps), batch size 64, learning rate 2e-4 with cosine schedule and 3% warmup, max length 256 tokens, bf16.
  • Hardware: 1× NVIDIA A100 80 GB (Google Colab), ~7.5 hours.
  • Final validation loss: 0.851; validation token accuracy 78.8%. Loss plateaued after ~7,000 steps.

Limitations

  • Trained and evaluated on a single test domain; quality on other genres (spoken language, technical texts) is untested.
  • Tuvan → Russian sometimes picks a wrong word sense (e.g. «хевис» → «шалаш» instead of «ковёр») and has to guess gender when the Tuvan source does not mark it.
  • Tuvan input that uses Н/О/У instead of Ң/Ө/Ү (common when typed without a Tuvan keyboard) can lead to mistranslations.
  • The adapter inherits the limitations and license terms of the base model.

Code

Training notebook (Colab), data preparation, and evaluation scripts: Agisight/tyv-translation-mlx.

Credits

  • Base model: Google, Gemma 4 E4B.
  • Data, fine-tuning, and evaluation: Ali Kuzhuget.

Identity and Version

Repository
Agisight/tyv-gemma4-e4b-lora
Publisher
Ali Kuzhuget
Task
Translation
Modality
Text
Library
peft
Parameters
Not stated by the source
Languages
ru, tyv
Revision
61a7dc472764140c0caedf44b82ddcfc798b6a0f
First published
2026-10-01
Last updated
2026-10-01

Files and Weights

7 files, 311.3 MB in total. The weights are 1 file totalling 279.1 MB in safetensors.

Weights1 file · 279.1 MB
Configuration1 file · 14.7 KB
Tokenizer2 files · 32.2 MB
Documentation1 file · 5.0 KB
Other1 file · 18.6 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
adapter_model.safetensorsWeights279.1 MB 0720bd2caeae
adapter_config.jsonConfiguration14.7 KB —
README.mdDocumentation5.0 KB —
chat_template.jinjaOther18.6 KB —
.gitattributesRepository1.6 KB —
tokenizer.jsonTokenizer32.2 MB a2619fe11b50
tokenizer_config.jsonTokenizer3.7 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
279.1 MB
Download from Ali Kuzhuget

Released by Ali Kuzhuget through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published279.1 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About tyv-gemma4-e4b-lora

Can I use tyv-gemma4-e4b-lora commercially?

Yes. tyv-gemma4-e4b-lora is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

source languages: nl; target languages: en; OPUS readme: nl-en; dataset: opus; model: transformer-align; pre-processing: normalization + SentencePiece.

Open weights apache-2.0 512 tokens transformers

Model · Translation

nllb-200-distilled-600M

AI at Meta

This is the model card of NLLB-200's distilled 600M variant. Here are the metrics for that particular checkpoint. - Information about training algorithms, parameters, fairness constraints or other applied approaches, and features. The exact training algorithm, data and the strategies to handle data imbalances for high and low resource languages that were used to train NLLB-200 is described in the paper. - Paper or other resource for more information NLLB Team et al, No Language Left Behind: Scaling Human-Centered Machine Translation, Arxiv, 2022 - Where to send questions or comments about the model: https://github.com/facebookresearch/fairseq/issues • Model performance measures: NLLB-200…

Open weights cc-by-nc-4.0 1,024 tokens transformers

source languages: en; target languages: ru; OPUS readme: en-ru; dataset: opus; model: transformer-align; pre-processing: normalization + SentencePiece.

Open weights apache-2.0 512 tokens transformers

This model can be used for translation and text-to-text generation. CONTENT WARNING: Readers should be aware this section contains content that is disturbing, offensive, and can propagate historical and current stereotypes. Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)). Further details about the dataset for this model can be found in the OPUS readme: en-de

Open weights cc-by-4.0 512 tokens transformers

hfname: kor-eng - sourcelanguages: kor - targetlanguages: eng - opusreadmeurl: https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/kor-eng/README.md - originalrepo: Tatoeba-Challenge - srcconstituents: {'korHani', 'korHang', 'korLatn', 'kor'} - tgtconstituents: {'eng'} - srcmultilingual: False - tgtmultilingual: False - urlmodel: https://object.pouta.csc.fi/Tatoeba-MT-models/kor-eng/opus-2020-06-17.zip - urltestset: https://object.pouta.csc.fi/Tatoeba-MT-models/kor-eng/opus-2020-06-17.test.txt - srcalpha3: kor - tgtalpha3: eng - shortpair: ko-en - chrF2score: 0.588 - brevitypenalty: 0.9590000000000001 - reflen: 17711.0 - srcname: Korean - tgtname: English - traindate…

Open weights apache-2.0 512 tokens transformers

source languages: de; target languages: en; OPUS readme: de-en; dataset: opus; model: transformer-align; pre-processing: normalization + SentencePiece.

Open weights apache-2.0 512 tokens transformers