Views
No views yet
| Metric | Original | Trimmed | Reduction |
|---|---|---|---|
| Vocabulary size | 248,320 tokens | 32,768 tokens | 86.80% |
| Model size | 2,213,241,664 params | 1,771,791,168 params | 19.95% |

1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "alphaedge-ai/Qwen.5-2B-mar-32768"
4
5# load the tokenizer and the model
6tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 torch_dtype="auto",
10 device_map="auto",
11 trust_remote_code=True
12)
13
14# prepare the model input
15prompt = "Your prompt in Marathi."
16messages = [
17 {"role": "user", "content": prompt}
18]
19text = tokenizer.apply_chat_template(
20 messages,
21 tokenize=False,
22 add_generation_prompt=True
23)
24model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
25
26# conduct text completion
27generated_ids = model.generate(
28 **model_inputs,
29 max_new_tokens=32768
30)
31output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]
32content = tokenizer.decode(output_ids, skip_special_tokens=True)
33
34print("content:", content)@misc{qwen3.5,
title = {Qwen3.5: Towards Native Multimodal Agents},
author = {Qwen Team},
month = {February},
year = {2026},
url = {https://qwen.ai/blog?id=qwen3.5}
}@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},
}