让专家模型在推理时灵活调整专家数量,适应不同硬件和需求。
Elastic MoE: Unlocking the Inference-Time Scalability of Mixture-of-Experts
- 训练时让专家学会多种组合协作,支持推理时动态调整激活数量。
- 推理时专家数可扩展至训练时的2-3倍,性能不下降反而提升。
- 适合需要弹性部署的场景,如云服务、移动设备等异构环境。
混合专家(MoE)模型通常在训练和推理时固定激活专家数量 $k$。但实际部署中常面临异构硬件、负载波动及不同质量-延迟需求,为每种场景单独训练模型成本高昂。由于MoE本身具有稀疏激活特性,调整激活专家数为单一模型服务多样预算提供了天然路径。然而我们发现,推理时增加激活专家数 $k'$(> k)并未带来预期增益,性能在小幅增加后迅速下降,这种现象称为‘推理时扩展墙’。深入分析表明,性能下降源于专家间缺乏协同能力。为此,我们提出新型训练框架——弹性混合专家(EMoE),使MoE模型能在推理时弹性调整激活专家数。通过同时训练专家以适应多种组合,并引导路由器做出高质量选择,EMoE确保了在不同推理预算下的稳健性能。在四个MoE架构(7B–21B)和九个基准上的大量实验表明,EMoE将有效扩展范围提升至训练时 $k$ 的2-3倍,同时达到更高峰值性能。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) models typically fix the number of activated experts $k$ at both training and inference. However, real-world deployments often face heterogeneous hardware, fluctuating workloads, and diverse quality-latency requirements, while training separate models for each scenario is costly. Considering that MoE models already operate with sparse activation, adjusting the number of activated experts offers a natural path to serving diverse budgets with a single model. Yet, we find that activating more experts $k'$ ($> k$) at inference does not yield the expected gains. Instead, performance degrades rapidly after only a slight increase, a phenomenon we term the \textit{inference-time scaling wall}. Further investigation reveals that this degradation stems from a lack of learned collaboration among experts. To address this, we introduce \textbf{Elastic Mixture-of-Experts (EMoE)}, a novel training framework that enables MoE models to elastically vary the number of activated experts at inference. By simultaneously training experts to collaborate in diverse combinations and encouraging the router to make high-quality selections, EMoE ensures robust performance across inference budgets. Extensive experiments across four MoE architectures (7B--21B) and nine benchmarks show that EMoE significantly expands the effective scaling range to 2-3$\times$ the training-time $k$, while also achieving higher peak performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。