通过大小专家混合策略,在消费级显卡上实现高效稀疏专家模型推理。
MoBiLE: Efficient Mixture-of-Experts Inference on Consumer GPU with Mixture of Big Little Experts
- 按重要性动态分配大/小专家,非关键令牌仅用一半专家
- 在消费级显卡上实现1.60x~1.72x加速,精度几乎无损
- 无需额外训练,可直接部署于主流MoE模型
稀疏激活的专家混合(MoE)模型在多种应用中表现出色。其核心机制是将活跃专家保留在GPU HBM中,未激活专家存于CPU DRAM,但该策略受制于CPU-GPU互连带宽。现有方法依赖预取技术加速,需额外训练模块,且对细粒度专家分割的最新模型效果下降。本文提出MoBiLE,一种即插即用的基于大小专家混合的推理框架。它对不重要的令牌减少专家数量至一半以提升速度,同时为重要令牌保留完整专家以保证质量。设计专用回退与预取机制,实现大、小专家间的高效切换。我们在四个典型现代MoE架构和复杂生成任务上评估了MoBiLE,结果表明在消费级显卡系统上相比基线提速1.60x至1.72x,精度损失可忽略不计。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) models have recently demonstrated exceptional performance across a diverse range of applications. The principle of sparse activation in MoE models facilitates an offloading strategy, wherein active experts are maintained in GPU HBM, while inactive experts are stored in CPU DRAM. The efficacy of this approach, however, is fundamentally constrained by the limited bandwidth of the CPU-GPU interconnect. To mitigate this bottleneck, existing approaches have employed prefetching to accelerate MoE inference. These methods attempt to predict and prefetch the required experts using specially trained modules. Nevertheless, such techniques are often encumbered by significant training overhead and have shown diminished effectiveness on recent MoE models with fine-grained expert segmentation. In this paper, we propose MoBiLE, a plug-and-play offloading-based MoE inference framework with \textit{mixture of big-little experts}. It reduces the number of experts for unimportant tokens to half for acceleration while maintaining full experts for important tokens to guarantee model quality. Further, a dedicated fallback and prefetching mechanism is designed for switching between little and big experts to improve memory efficiency. We evaluate MoBiLE on four typical modern MoE architectures and challenging generative tasks. Our results show that MoBiLE achieves a speedup of 1.60x to 1.72x compared to the baseline on a consumer GPU system, with negligible degradation in accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。