arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.12247cs.CLcs.DC
收藏

EPS-MoE:面向高性价比MoE推理的专家流水线调度器

EPS-MoE: Expert Pipeline Scheduler for Cost-Efficient MoE Inference

Meituan(美团)

Yulei Qian, Fengcun Li, Xiangyang Ji, Xiaoyu Zhao, Jianchao Tan, Kefeng Zhang, Xunliang Cai

AI总结:

本文提出EPS-MoE专家流水线调度器,通过动态选择MoE FFN中GroupGemm/DenseGemm内核并自适应重叠计算与通信,显著提升MoE推理吞吐量,使DeepSeekV2从100K tokens/s加速至至少120K tokens/s。

摘要:

Mixture-of-Experts(MoE)模型已成为大语言模型(LLM)领域中的一种重要架构,在模型性能与计算效率之间实现了更好的平衡。然而,通用矩阵乘法(GEMM)运算和庞大的参数量带来了计算效率与通信开销方面的挑战,这些因素在推理过程中成为吞吐量瓶颈。对MoE应用单一并行策略(如专家并行EP、数据并行DP、张量并行TP)或简单组合这些策略,通常只能获得次优的推理吞吐量。本文提出EPS-MoE,一种新颖的MoE专家流水线调度器,其性能超越了现有的并行方案。我们的方法通过针对不同负载动态选择GroupGemm和DenseGemm的最佳内核实现来优化MoE前馈网络(FFN)模块的计算,并自适应地将这些计算与通信重叠,从而大幅提升吞吐量。实验结果表明,与现有并行推理方法相比,prefill吞吐量最多提升52.4%。具体而言,我们的方法将高度优化的DeepSeekV2模型从宣称的每秒100K tokens加速至至少每秒120K tokens。

英文摘要:

The Mixture-of-Experts (MoE) model has emerged as a prominent architecture in the field of Large Language Models (LLMs), providing a better balance between model performance and computational efficiency. However the General Matrix Multiply (GEMM) operations and large parameters introduce challenges related to computational efficiency and communication overhead, which become throughput bottlenecks during inference. Applying a single parallelism strategy like EP, DP, TP or a straightforward combination of them to MoE usually achieves sub-optimal inference throughput. This paper introduces EPS-MoE, a novel expert pipeline scheduler for MoE that surpasses the existing parallelism schemes. Our approach optimizes the computation of MoE FeedForward Network (FFN) modules by dynamically selecting the best kernel implementation of GroupGemm and DenseGemm for different loads and adaptively overlapping these computations with communication, leading to a substantial increase in throughput. Our experimental results demonstrate at most 52.4\% improvement in prefill throughput compared to existing parallel inference methods. Specifically, our method accelerated the highly optimized DeepSeekV2 model from a claimed 100K tokens per second to at least 120K tokens per second.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑