Sparse Mixture of Experts (SMoE) performs conditional computation by selectively activating a subset of experts, thereby enabling scalable parameter growth in large language models (LLMs). However, the expanded parameter scale exceeds the memory capacity of a single device, necessitating distributed deployment for inference. This setup introduces two critical challenges: (1) Communication Issue: Transferring features to devices with activated experts leads to significant communication overhead. (2) Computational Load Issue: Skewed expert activation overloads certain GPUs, resulting in load imbalance across devices. Among these, communication overhead is identified as the main bottleneck in SMoE inference. Nevertheless, reducing communication between devices may exacerbate computational load imbalance, leading to device idleness and resource waste. Therefore, we present GRACE-MoE, short for Grouping and Replication with Locality-Aware Routing for SMoE inference. GRACE-MoE is a co-optimization framework that jointly reduces communication overhead and alleviates computational load imbalance. Specifically, the framework comprises two key phases: (1) Grouping & Replication: This phase groups experts based on their affinity to reduce cross-device communication. Additionally, dynamic replication is applied to address load skew, improving computational load balance across GPUs. (2) Routing: This phase employs a locality-aware routing strategy with load prediction. It prioritizes local replicas to minimize communication overhead and balances requests across remote replicas when necessary. Experiments on diverse models and multi-node, multi-GPU environments demonstrate that GRACE-MoE efficiently reduces end-to-end inference latency, achieving up to 3.79x speedup over state-of-the-art systems. Code for GRACE-MoE will be released upon acceptance.


翻译:稀疏专家混合模型通过有条件地选择性激活部分专家,实现了大语言模型中参数规模的可扩展增长。然而,扩展后的参数量超出了单设备的存储容量,因此推理过程需要分布式部署。这种部署方式带来了两个关键挑战:(1)通信问题:将特征传输至激活专家所在的设备会产生显著的通信开销。(2)计算负载问题:专家激活的倾斜分布会导致部分GPU过载,从而造成设备间的负载不均衡。其中,通信开销被确定为SMoE推理中的主要瓶颈。然而,减少设备间通信可能会加剧计算负载的不均衡,导致设备闲置和资源浪费。为此,我们提出了GRACE-MoE,全称为面向SMoE推理的基于局部性感知路由的分组与复制机制。GRACE-MoE是一个协同优化框架,旨在联合减少通信开销并缓解计算负载不均衡。具体而言,该框架包含两个关键阶段:(1)分组与复制:此阶段基于专家间的亲和性进行分组,以减少跨设备通信。此外,采用动态复制机制以应对负载倾斜,从而改善GPU间的计算负载均衡。(2)路由:此阶段采用一种结合负载预测的局部性感知路由策略。该策略优先选择本地副本以最小化通信开销,并在必要时将请求均衡地分配至远程副本。在不同模型以及多节点、多GPU环境下的实验表明,GRACE-MoE能有效降低端到端推理延迟,相比现有最优系统最高可实现3.79倍的加速。GRACE-MoE的代码将在论文录用后开源。

0
下载
关闭预览

相关内容

【普林斯顿博士论文】大型模型的高效推理
专知会员服务
22+阅读 · 2025年8月10日
《混合专家模型推理优化技术综述》
专知会员服务
45+阅读 · 2024年12月21日
Jeff Dean署名《深度学习稀疏专家模型》综述论文
专知会员服务
39+阅读 · 2022年10月4日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员