通过时空预测提前加载专家模块,显著降低MoE大模型推理延迟。
A Spatio-Temporal Expert Prefetching Framework for Efficient MoE-based LLM Inference

- 利用相邻层和连续令牌间的专家调用相关性,预测未来需加载的专家。
- 在真实场景中实现最高3.1倍的推理吞吐量提升,能耗降低45%。
- 适合部署MoE模型的云服务与边缘设备,尤其关注推理效率的开发者。
基于混合专家(MoE)的大语言模型(如Qwen和DeepSeek)通过仅激活部分专家来提升模型容量,同时控制单个标记的计算开销。然而,动态且不规则的专家激活模式导致推理时需按需加载专家,产生显著的加载延迟,成为性能与能效瓶颈。我们对多种MoE模型及应用(包括语言理解与代码生成)中的专家选择行为进行了全面分析,发现同一应用场景下,相邻层及连续解码令牌间的专家请求具有强相关性,具备可预测性。基于此,提出ST-MoE框架,通过轻量级运行时预测机制与可重构硬件设计,主动预取未来可能使用的专家,使加载过程与计算重叠。该机制结合硬件支持,显著提升推理性能与能效,同时保持原始模型精度不变。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) based large language models (LLMs), such as Qwen and DeepSeek, have recently emerged as an effective approach to improving model capacity without proportionally increasing computational cost. By replacing the conventional feed-forward network in dense LLMs with a set of experts and activating only a subset of them for each input token, MoE models significantly increase the total number of parameters while keeping the per-token computation relatively manageable. However, this dynamic and irregular expert activation pattern also introduces substantial expert loading overhead during inference, since the required experts must be fetched on demand according to token-dependent routing results. As a result, expert loading latency becomes a major source of performance and energy inefficiency. To this end, we first perform a comprehensive analysis of expert selection behavior in various MoE-based LLMs and applications, including language understanding and code generation. Our analysis reveals that, within each application domain, expert requests exhibit strong correlation across both adjacent MoE layers and consecutive decoding tokens, making future expert activations predictable. Based on this insight, we propose ST-MoE, a spatio-temporal expert prefetching framework that proactively stages experts ahead of use to overlap expert loading with ongoing computation. ST-MoE combines a lightweight runtime prediction mechanism that preserves the original routing behavior with a reconfigurable hardware design that efficiently supports dynamic expert prefetching. The combined effect of the prediction mechanism with the supporting hardware significantly improves MoE inference performance and energy efficiency while preserving model inference accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。