arXiv:2603.08960cs.LGcs.AR2026-03被引 1

MoE模型推理时效率低,因专家路由导致计算和内存浪费。

The $qs$ Inequality: Quantifying the Double Penalty of Mixture-of-Experts at Inference

  • 提出qs不等式,量化MoE推理中的双重性能损失
  • 长上下文下,同质量的密集模型推理速度高4.5倍
  • 适合关注大模型推理优化与部署的工程师

Mixture-of-Experts(MoE)模型在训练时高效,但推理时常失去优势。本文揭示其结构上的双重惩罚:一是专家路由打散微批次,降低权重复用;二是大量驻留专家占用高带宽内存(HBM),压缩键值缓存空间。该现象被形式化为重用碎片化,使前馈网络进入带宽受限状态,尤其在长上下文场景下更明显。我们提出$qs$不等式,统一稀疏度$s$(每标记激活参数比例)与质量匹配因子$q$(使密集模型达到同等质量所需放大倍数),可预测MoE在推理中是否结构性劣势。在DeepSeek-V3、Qwen3-235B、Grok-1和Switch-C等前沿模型上验证,当上下文长度达128k时,质量相当的密集基线模型吞吐量高出4.5倍。关键的是,像Switch-C这类超大规模模型可能在某些集群规模下无法部署,而对应密集模型仍可行。结果表明,训练时的FLOP效率不能代表推理表现,建议将MoE视为训练优化手段,通过蒸馏转为密集模型以实现推理高效部署。

原文摘要 · Abstract (English)

Mixture-of-Experts (MoE) models deliver high quality at low training FLOPs, but this efficiency often vanishes at inference. We identify a double penalty that structurally disadvantages MoE architectures during decoding: first, expert routing fragments microbatches and reduces weight reuse; second, massive resident expert pools reduce high-bandwidth memory (HBM) headroom for the KV cache. This phenomenon, formalized as reuse fragmentation, pushes feed-forward networks (FFNs) into a bandwidth-bound regime, especially at long context lengths. We introduce the $qs$ inequality, a predictive criterion that identifies when MoE is structurally disadvantaged relative to a quality-matched dense model. This criterion unifies sparsity ($s$), the fraction of parameters activated per token, and the quality-equivalence factor ($q$), the size multiplier required for a dense model to match MoE performance. Our evaluation across frontier models including DeepSeek-V3, Qwen3-235B, Grok-1, and Switch-C demonstrates that this fragmentation is a general architectural phenomenon. For DeepSeek-V3 at 128k context, this results in a 4.5x throughput advantage for a quality-matched dense baseline. Crucially, massive architectures like Switch-C can become infeasible on cluster sizes where a quality-matched dense model remains viable. Our results suggest that training-time FLOP efficiency is an incomplete proxy for inference-time performance in long-context serving. They also indicate that MoE may be best viewed as a training-time optimization, with distillation into dense models as a possible path toward inference-efficient deployment.

MoE推理优化长上下文模型压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。