Views
No views yet
| Metric | Original | Trimmed | Reduction |
|---|---|---|---|
| Vocabulary size | 262,144 tokens | 16,384 tokens | 93.75% |
| Model size | 999,885,952 params | 716,770,432 params | 28.31% |

1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "alphaedge-ai/gemma-3-1b-it-bar-16384"
4
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 torch_dtype="auto",
9 device_map="auto"
10)
11
12prompt = "Your prompt in Bavarian."
13messages = [{"role": "user", "content": prompt}]
14text = tokenizer.apply_chat_template(
15 messages,
16 tokenize=False,
17 add_generation_prompt=True
18)
19model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
20
21generated_ids = model.generate(**model_inputs, max_new_tokens=256)
22output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]
23response = tokenizer.decode(output_ids, skip_special_tokens=True)
24print(response)1@misc{gemmateam2025gemma3technicalreport,
2 title={Gemma 3 Technical Report},
3 author={Gemma Team},
4 year={2025},
5 eprint={2503.19786},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2503.19786},
9}@misc{hf_blogpost_trimming,
title={Introduction to Trimming},
author={Loïck BOURDOIS and Tom AARSEN and Bram VANROY and Christopher AKIKI and Woojun JUNG and Manuel ROMERO and Prithiv SAKTHI},
year={2026},
url={https://huggingface.co/blog/lbourdois/introduction-to-trimming},
}