arXiv:2410.12247cs.CLcs.DC2024-10被引 11

优化专家模型推理,让大模型跑得更快更省资源。

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

  • 动态选最优计算内核,智能调度计算与通信
  • 预填充吞吐最高提升52.4%,达12万词/秒
  • 适合追求高效推理的LLM部署者

混合专家(MoE)模型已成为大语言模型中的主流架构,在性能与计算效率之间取得更好平衡。然而,通用矩阵乘法(GEMM)操作和大量参数带来了计算效率与通信开销问题,成为推理阶段的吞吐瓶颈。单一并行策略(如EP、DP、TP)或简单组合通常无法达到最优推理吞吐。本文提出EPS-MoE,一种新型专家流水线调度器,通过动态选择分组GEMM与密集GEMM的最佳内核实现对MoE前馈网络的优化,并自适应地重叠计算与通信,显著提升吞吐量。实验表明,相比现有方法,预填充吞吐最高提升52.4%。以深度求索V2模型为例,其推理速度从宣称的每秒10万词提升至至少12万词。

原文摘要 · Abstract (English)

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.

MoE推理流水线调度大模型优化

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