Views
No views yet
Built on Google's Gemma 4 (viaprincipled-intelligence/gemma-4-E2B-it-text-only, the text-only checkpoint). Use is governed by the Gemma Terms of Use and the Gemma Prohibited Use Policy — https://ai.google.dev/gemma/terms . "Gemma is provided under and subject to the Gemma Terms of Use." This derivative keeps the Gemma name and license as required.
| Base (text-only) | This model (Mini) | |
|---|---|---|
| Vocab | 262,144 | 69,246 (EN+VI) |
| Params | 4.63 B | 2.60 B |
| bf16 weights | 9.26 GB | 5.21 GB |
| q8_0 GGUF | 4.6 GB | 2.6 GB |
| EN/VI accuracy (UIT-VSFC, 300) | 0.5567 | 0.5567 (Δ 0, 99.7% agreement) |
embed_tokens, embed_tokens_per_layer (PLE), and the tied lm_head are
row-sliced to the keep-set. The original rows are kept verbatim, so EN/VI
behaviour is unchanged — only the ability to emit other-language tokens is removed.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3ID = "thanglq150188/gemma-4-E2B-mini"
4tok = AutoTokenizer.from_pretrained(ID)
5m = AutoModelForCausalLM.from_pretrained(ID, dtype=torch.bfloat16, device_map="cuda")
6msgs = [{"role": "user", "content": "Thủ đô của Việt Nam là thành phố nào?"}]
7ids = tok.apply_chat_template(msgs, add_generation_prompt=True,
8 return_tensors="pt", return_dict=True).to("cuda")
9print(tok.decode(m.generate(**ids, max_new_tokens=64)[0, ids["input_ids"].shape[1]:],
10 skip_special_tokens=True))<|turn> / <turn|> (not Gemma 2/3's <start_of_turn>).1# gemma4-envi-pruned-q8_0.gguf and gemma4_chat.jinja are included in this repo
2llama-server -m gemma4-envi-pruned-q8_0.gguf -ngl 99 -fa on \
3 --parallel 8 --ctx-size 65536 --cont-batching \
4 --chat-template-file gemma4_chat.jinjavsfc-sentiment-lora/ — demo finetune (optional)peft.PeftModel.from_pretrained(base, "thanglq150188/gemma-4-E2B-mini", subfolder="vsfc-sentiment-lora").
Error analysis: 0 of 16 mistakes involved a pruned-away token — pruning is not the cause.