arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.06206cs.LG
收藏

专家联邦:用于大型语言模型的通信高效的分布式推理

Federation of Experts: Communication Efficient Distributed Inference for Large Language Models

Stanford University(斯坦福大学)

Muhammad Shahir Abdurrahman, Chun Deng, Azalia Mirhoseini, Philip Levis

AI总结:

本文提出FedEx架构,通过将MoE块分为多个集群,减少专家间通信开销,提升单节点和多节点下的推理吞吐量和延迟,同时保持生成质量。

摘要:

混合专家机制已成为使大型语言模型(LLMs)计算高效的主要方法。然而在分布式设置中,专家之间通信token嵌入是一个显著瓶颈。我们提出了新颖的专家联邦(FoE)架构。FoE将transformer层的MoE块重新组织为多个MoE集群。每个集群只负责一个KV头,并在这些专家之间应用专家并行性。在集群之间,一个求和同步后注意力残差,然后驱动下一个MoE块的路由和调度。在单节点设置中,FoE完全消除了所有到所有通信,因为同一组内的所有专家都在同一张GPU上。在多节点设置中,FoE将所有到所有通信限制在节点内织网,从而显著减少通信开销。FoE的实现表明,在LongBench上,FoE在单节点和多节点设置中显著提高了推理吞吐量和延迟,将端到端前向传递延迟减少高达5.2倍,TTFT减少3.62倍,TBT减少1.95倍。它在保持生成质量与相同规模和训练配置的混合专家模型相当的同时实现了这些效果。

英文摘要:

Mixture of experts has emerged as the primary mechanism for making Large Language Models (LLMs) computationally efficient. However, in distributed settings, communicating token embeddings between experts is a significant bottleneck. We present the novel Federation of Experts (FoE) architecture. FoE restructures the MoE block of a transformer layer into multiple MoE clusters. Each cluster is responsible for only one of the KV heads and expert parallelism is applied between those experts. Between clusters, a sum synchronizes the post-attention residuals, which then drives routing and dispatch for the next MoE block. In a single-node setting, FoE completely eliminates all-to-all communication as all experts within a group are contained on the same GPU. In multi-node settings, FoE confines all-to-all communication to the intra-node fabric, thus significantly reducing communication overhead. An implementation of FoE finds that on LongBench, FoE significantly improves inference throughput and latency in both single-node and multi-node settings, reducing end-to-end prefill latency by up to 5.88x, TTFT by 3.66x, and TPOT by 1.53x. It does so while achieving comparable generation quality to a mixture of experts model of the same size and training configuration.

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

↑