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

Lynx:通过动态批量感知专家选择实现高效的MoE推理

Lynx: Enabling Efficient MoE Inference through Dynamic Batch-Aware Expert Selection

Georgia Institute of Technology(佐治亚理工学院)

Vima Gupta, Jae Hyung Ju, Kartik Sinha, Ada Gavrilovska, Anand Padmanabha Iyer

AI总结:

本文提出Lynx系统,通过利用MoE训练中的负载平衡损失特性,减少专家调用总数,从而在不依赖工作负载的情况下实现高效的MoE推理,提升了吞吐量并保持了低的精度损失。

摘要:

混合专家(MoE)模型提供的选择性参数激活使其成为现代基础模型的流行选择。然而,当用于服务时,MoE面临一个根本性的矛盾。批处理对于服务性能至关重要,迫使激活所有专家,从而抵消了MoE的优势并加剧了内存带宽瓶颈。现有高效MoE推理方法即使在广泛的工作负载特定调优下也无法解决这一矛盾。我们提出了Lynx,一个能够在工作负载无关的情况下实现高效MoE推理的系统。Lynx利用了MoE训练的一个关键特性:负载平衡损失引入了批次级别的专家激活偏斜和冗余,它通过一种新的AffinityBinning技术重新映射每个批次中的低亲和力的token到专家分配,从而减少总调用的专家数量。我们在九个基准测试中对四种最先进的模型家族进行评估,结果显示Lynx在保持精度损失低于1个百分点的情况下,实现了高达1.30倍的吞吐量提升。此外,Lynx与现有技术互补,进一步提升了其性能,最高可提升1.38倍。

英文摘要:

Selective parameter activation provided by Mixture-of-Expert (MoE) models have made them a popular choice in modern foundational models. However, MoEs face a fundamental tension when employed for serving. Batching, critical for performance in serving, forces the activation of all experts, thereby negating MoEs' benefits and exacerbating memory bandwidth bottlenecks. Existing work on efficient MoE inference are unable to resolve this tension even with extensive workload-specific tuning. We present LYNX, a system that enables efficient MoE inference in a workload-agnostic fashion. LYNX leverages a key property of MoE training: load-balancing losses introduce batch-level expert activation skews and redundancy, which it exploits by remapping low-affinity token-to-expert assignments within each batch using a novel AffinityBinning technique that reduces the total experts invoked. Our evaluation of LYNX on four state-of-the-art model families across nine benchmarks shows that it achieves up to 1.30x improvement in throughput while maintaining accuracy loss of less than 1% points across tasks. Further, LYNX is complementary to existing techniques where it additionally boosts their performance by up to 1.38x.

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

↑