ExpertFlow通过动态调度专家激活,显著降低MoE推理延迟。
ExpertFlow: Adaptive Expert Scheduling and Memory Coordination for Efficient MoE Inference
- 根据运行时状态自适应调整专家预取范围。
- 将模型停顿时间降至基准的0.1%以下。
- 适合在显存受限环境下优化MoE模型推理。
大语言模型的扩展正受现代GPU内存容量限制。为缓解此问题,混合专家(MoE)架构在推理时仅激活少量参数,大幅降低内存需求与计算开销。然而,传统MoE推理方法在每层独立选择活跃专家,常因频繁的主机与GPU内存间参数传输引入显著延迟。此外,现有跨层预测策略多基于固定步长,缺乏对不同硬件平台和负载的适应性,削弱了其鲁棒性与效果。为此,我们提出ExpertFlow,一个结合自适应专家预取与缓存感知路由的运行时系统。ExpertFlow通过利用传输带宽、参数维度及模型反馈信号等运行时统计信息,持续调整专家激活的预测窗口。同时,它采用融合预门控信息与中间计算状态的混合跨层预测机制,以更准确预测未来专家需求。通过动态优化预取决策并匹配实际使用行为,ExpertFlow有效减少缓存未命中,并消除专家切换带来的延迟。评估显示,ExpertFlow将模型停顿时间降至基线的0.1%以内,证明其在严苛内存约束下优化MoE推理的强大能力。
原文摘要 · Abstract (English)
The expansion of large language models is increasingly limited by the constrained memory capacity of modern GPUs. To mitigate this, Mixture-of-Experts (MoE) architectures activate only a small portion of parameters during inference, significantly lowering both memory demand and computational overhead. However, conventional MoE inference approaches, which select active experts independently at each layer, often introduce considerable latency because of frequent parameter transfers between host and GPU memory. In addition, current cross-layer prediction strategies, which are typically based on fixed steps, lack adaptability across different hardware platforms and workloads, thereby reducing their robustness and effectiveness. To address these challenges, we present ExpertFlow, a runtime system for MoE inference that combines adaptive expert prefetching and cache-aware routing. ExpertFlow continuously adjusts its prediction horizon for expert activation by leveraging runtime statistics such as transfer bandwidth, parameter dimensionality, and model feedback signals. Furthermore, it incorporates a hybrid cross-layer prediction scheme that fuses pregating information with intermediate computational states to anticipate future expert needs. By adaptively refining prefetching decisions and aligning them with actual usage behavior, ExpertFlow effectively decreases cache misses and removes latency caused by expert swap-ins. Our evaluation demonstrates that ExpertFlow reduces model stall time to less than 0.1% of the baseline, highlighting its capability to optimize MoE inference under stringent memory constraints.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。