arXiv:2410.07348cs.LGcs.AI2024-10ICLR被引 59

MoE++用零计算专家加速模型,提升性能且降低通信开销。

MoE++: Accelerating Mixture-of-Experts Methods with Zero-Computation Experts

  • 引入零计算专家,动态决定是否使用FFN或跳过处理
  • 相同规模下专家前向吞吐提升1.1-2.1倍,性能更优
  • 适合追求高效部署与推理加速的大型模型开发者

本文提出MoE++,一种通用异构Mixture-of-Experts框架,融合前馈网络(FFN)与零计算专家。设计三类零计算专家:零专家(丢弃)、复制专家(跳过)、常数专家(替换),分别对应三种操作。该设计带来三大优势:(i) 低计算开销:每个token可动态选择激活的FFN数量,或完全跳过MoE层;(ii) 高性能:简单样本少用专家,让复杂样本获得更多资源,释放更大潜力;(iii) 易部署:零计算专家参数极少,可全量部署于各GPU,避免跨GPU通信开销与专家负载不均问题。同时引入门控残差机制,使每层决策参考上一层路径。大量实验表明,相同规模下,MoE++相比原生MoE实现1.1–2.1倍专家前向吞吐提升,显著增强效率与性能,为高效先进MoE模型发展奠定基础。

原文摘要 · Abstract (English)

In this work, we aim to simultaneously enhance the effectiveness and efficiency of Mixture-of-Experts (MoE) methods. To achieve this, we propose MoE++, a general and heterogeneous MoE framework that integrates both Feed-Forward Network~(FFN) and zero-computation experts. Specifically, we introduce three types of zero-computation experts: the zero expert, copy expert, and constant expert, which correspond to discard, skip, and replace operations, respectively. This design offers three key advantages: (i) Low Computing Overhead: Unlike the uniform mixing mechanism for all tokens within vanilla MoE, MoE++ allows each token to engage with a dynamic number of FFNs, be adjusted by constant vectors, or even skip the MoE layer entirely. (ii) High Performance: By enabling simple tokens to utilize fewer FFN experts, MoE++ allows more experts to focus on challenging tokens, thereby unlocking greater performance potential than vanilla MoE. (iii) Deployment Friendly: Given that zero-computation experts have negligible parameters, we can deploy all zero-computation experts on each GPU, eliminating the significant communication overhead and expert load imbalance associated with FFN experts distributed across different GPUs. Moreover, we leverage gating residuals, enabling each token to consider the pathway taken in the previous layer when selecting the appropriate experts. Extensive experimental results demonstrate that MoE++ achieves better performance while delivering 1.1-2.1x expert forward throughput compared to a vanilla MoE model of the same size, which lays a solid foundation for developing advanced and efficient MoE-related models.

MoE模型加速零计算

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