Downloads · 30 days
22
16% of all-time downloads
Goader/gemma-3-4b-it-uk-matt
gemma-3-4b-it-uk-matt is a text generation model from Goader. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
google/gemma-3-4b-it transferred to the Ukrainian-centric Lapa tokenizer with MATT (Model-Aware Tokenizer Transfer). The tokenizer keeps the original Gemma vocabulary and adds Ukrainian tokens, cutting the token count…
Downloads · 30 days
22
16% of all-time downloads
All-time downloads
141
Public
Parameters
4.3B
8.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.6 GB · 100%
From the Hugging Face model README
google/gemma-3-4b-it transferred to the Ukrainian-centric Lapa tokenizer with MATT (Model-Aware Tokenizer Transfer). The tokenizer keeps the original Gemma vocabulary and adds Ukrainian tokens, cutting the token count on Ukrainian text by roughly a third. Only the input embeddings differ from the original model; the chat template, special tokens and generation config are unchanged.
Base-model counterpart: Goader/gemma-3-4b-uk-matt.
gemma-3-4b-it, with every token present in the original vocabulary
copied exactly from the original model, then trained with the AIM objective against the frozen original
model: layers 1–16 of 34, all_words_last_token alignment, MSE loss, lr 1e-4, original-vocabulary
embeddings frozen.| metric | gemma-3-4b-it (original tokenizer) | FOCUS init | this model |
|---|---|---|---|
| Belebele uk (acc) | 77.7 | 38.0 | 64.0 |
| Global MMLU uk (acc) | 49.8 | 31.4 | 41.5 |
| FLORES en→uk (BLEU / chrF) | 26.3 / 57.5 | 24.3 / 55.2 | 25.4 / 56.8 |
| FLORES uk→en (BLEU / chrF) | 39.6 / 66.9 | 15.1 / 42.0 | 33.7 / 60.8 |
| WMT en→uk (BLEU) | 7.2 | 6.1 | 9.4 |
| XLSum uk (ROUGE-1) | 6.9 | 5.5 | 5.6 |
Generation into Ukrainian is essentially fully recovered (97–99 % on FLORES en→uk). Understanding-heavy tasks recover ~82–91 %, less than the base-model transfer (94–98 %), so this model trades some accuracy on Ukrainian comprehension for ~35 % shorter Ukrainian sequences.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Goader/gemma-3-4b-it-uk-matt")
model = AutoModelForCausalLM.from_pretrained("Goader/gemma-3-4b-it-uk-matt", torch_dtype="bfloat16", device_map="auto")
messages = [{"role": "user", "content": "Поясни простими словами, що таке фотосинтез."}]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=256)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
Text-only: the vision tower is inherited unchanged but the image path was not evaluated.