Views
No views yet
AutoTokenizer and AutoModelForCausalLM from transformers. Since the model uses a custom architecture, trust_remote_code=True is required.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4model_id = "SparseLLM/DECO-1.2B"
5tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 torch_dtype=torch.bfloat16,
9 trust_remote_code=True,
10).to("cuda").eval()
11
12prompt = "Mixture-of-Experts models are useful because"
13inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
14
15with torch.no_grad():
16 output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
17
18print(tokenizer.decode(output[0], skip_special_tokens=True))1@article{song2026deco,
2 title={{DECO}: Sparse Mixture-of-Experts with Dense-Comparable Performance on End-Side Devices},
3 author={Chenyang Song, Weilin Zhao, Xu Han, Chaojun Xiao, Yingfa Chen, Zhiyuan Liu},
4 journal={arXiv preprint arXiv:2605.10933},
5 year={2026},
6 url={https://arxiv.org/pdf/2605.10933},
7}