S2-MoE: Enabling Efficient Self-Speculative Decoding for Mixture-of-Experts on Edge Devices
Organizations: Institute for Artificial Intelligence, Peking University, Beijing, China · School of Integrated Circuits, Peking University, Beijing, China · School of Electronics Engineering and Computer Science, Peking University, Beijing, China
Abstract
Deploying large language models (LLMs) for inference on edge devices is challenging due to severe memory and bandwidth constraints. While speculative decoding and Mixture-of-Experts (MoE) have been proposed to improve inference efficiency, naively combining them often incurs excessive verification overhead and poor expert reuse, limiting their effectiveness in memory-bound edge settings. In this work, we propose S2-MoE, an efficient self-speculative decoding framework for MoE inference on edge devices. S2-MoE reduces redundant verification through routing-aware adaptive speculative expansion, improves verification efficiency with reuse-aware expert gating, and aligns draft and target execution via shared context. Implemented in llamacpp, S2-MoE achieves up to speedup (about on average) over standard autoregressive decoding across diverse MoE models and datasets on edge devices. Code is available at https://github.com/angerybob/S2-MoE.
Figures & tables
| Model configuration | SD hyperparameter | |||||
| Model | Total Params | Activated Params | Total Experts | Experts/Token | Cap | Draft Experts |
| OLMoE | 6.7 | 1.1 | 64 | 8 | 18 | 2 |
| DeepSeek | 15.3 | 1.35 | 64 | 6 | 16 | 1 |
| Qwen3 | 30.5 | 3.3 | 128 | 8 | 14 | 3 |
| GPT-OSS | 116.8 | 5.7 | 128 | 4 | 6 | 1 |
| Task accuracy | Long-context | Distribution consistency | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Method | GSM8K | HumanEval | ARC-E | ARC-C | Avg. | Gov. | NQA | Qasper | Mean KL | RMS | Top-1 | PPL |
| OLMoE | Original | 35.29 | 22.56 | 55.81 | 43.86 | 39.38 | 24.69 | 8.10 | 21.52 | 0 | 0 | 100 | 1.000 |
| S 2 -MoE | 34.49 | 24.39 | 55.71 | 43.86 | 39.61 | 24.14 | 7.90 | 23.30 | 0.048 | 5.20 | 89.89 | 1.012 | |
| DeepSeek | Original | 66.64 | 48.98 | 63.06 | 56.03 | 58.68 | 30.30 | 11.86 | 27.40 | 0 | 0 | 100 | 1.000 |
| S 2 -MoE | 67.27 | 50.20 | 66.91 | 58.56 | 60.74 | 29.20 | 13.13 | 32.72 | 0.065 | 6.95 | 89.13 | 1.013 | |
| Model | Dataset | w/o Context-Aligned | w/ Context-Aligned | Acceptance rate |
|---|---|---|---|---|
| DeepSeek | HumanEval | 43.01 | 52.91 | +23.02% |
| GSM8K | 36.08 | 48.71 | +35.01% | |
| OLMoE | HumanEval | 32.46 | 40.31 | +24.18% |
| GSM8K | 33.01 | 59.09 | +79.01% |
| Dataset | w/o RG | w/ RG | Reuse Improvement (%) |
|---|---|---|---|
| HumanEval | 0.6017 | 0.4453 | 25.99 |
| GSM8K | 0.5893 | 0.3943 | 33.09 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
LLM Inference Acceleration
LLM inference acceleration develops algorithms and systems that reduce language-model latency, memory use, and serving cost while preserving output quality.
See all 1,084 papers