Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- zh
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# DECO-0.2B
|
| 10 |
+
This is the 0.2B DECO checkpoint introduced by the paper *DECO: Sparse Mixture-of-Experts with Dense-Comparable Performance on End-Side Devices*. DECO is an improved version of our previous [BlockFFN](https://arxiv.org/pdf/2507.08771) architecture, with dense-comparable performance given the same budget of total parameters.
|
| 11 |
+
|
| 12 |
+
Links: [[Paper](https://arxiv.org/pdf/2605.10933)] [[Code](https://github.com/thunlp/DECO)]
|
| 13 |
+
|
| 14 |
+
### Quick start
|
| 15 |
+
|
| 16 |
+
You can load and use this model with `AutoTokenizer` and `AutoModelForCausalLM` from `transformers`.
|
| 17 |
+
|
| 18 |
+
```python
|
| 19 |
+
import torch
|
| 20 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 21 |
+
model_id = "SparseLLM/DECO-0.2B"
|
| 22 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 23 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 24 |
+
model_id,
|
| 25 |
+
torch_dtype=torch.bfloat16,
|
| 26 |
+
trust_remote_code=True,
|
| 27 |
+
).to("cuda").eval()
|
| 28 |
+
prompt = "Mixture-of-Experts models are useful because"
|
| 29 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 30 |
+
with torch.no_grad():
|
| 31 |
+
output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
|
| 32 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
### Citation
|
| 36 |
+
If you find our work useful for your research, please kindly cite our paper as follows:
|
| 37 |
+
```
|
| 38 |
+
@article{song2026deco,
|
| 39 |
+
title={{DECO}: Sparse Mixture-of-Experts with Dense-Comparable Performance on End-Side Devices},
|
| 40 |
+
author={Chenyang Song, Weilin Zhao, Xu Han, Chaojun Xiao, Yingfa Chen, Zhiyuan Liu},
|
| 41 |
+
journal={arXiv preprint arXiv:2605.10933},
|
| 42 |
+
year={2026},
|
| 43 |
+
url={https://arxiv.org/pdf/2605.10933},
|
| 44 |
+
}
|
| 45 |
+
```
|