Large-scale Mixture-of-Experts (MoE) models rely on \emph{expert parallelism} for efficient training and inference, which splits experts across devices and necessitates distributed data shuffling to route each token to its assigned experts. However, existing communication libraries handle this shuffling poorly; its overhead can account for over half of end-to-end runtime. We present FUSCO, an MoE-friendly communication library that achieves efficient and lightweight data shuffling through fused data transformation and communication, based on the key observation that MoE's expert-major data layout conflicts with the device-major layout expected by communication operations. FUSCO captures the fine-grained data layout, which is then interpreted by a pipelined communication engine that performs the required shuffling efficiently along the communication path. Lightweight planning and load-balancing mechanisms complement the engine by eliminating redundant communication and dispersing traffic. Evaluations on representative benchmarks illustrate that FUSCO achieves up to 3.84$\times$ and 2.01$\times$ speedups over NCCL and DeepEP (the state-of-the-art MoE communication library), respectively. In end-to-end MoE tasks, compared to NCCL and DeepEP, FUSCO reduces the training latency by 1.17-1.39$\times$ and 1.10-1.19$\times$, and lowers the first-token generation latency in inference by 1.09-1.25$\times$ and 1.06-1.16$\times$.


翻译:大规模专家混合(MoE)模型依赖\emph{专家并行}进行高效训练与推理,该策略将专家分布于不同设备上,并需要通过分布式数据混洗将每个令牌路由至其分配的专家。然而,现有通信库对此类混洗操作处理不佳;其开销可占端到端运行时间的一半以上。本文提出FUSCO,一个面向MoE的通信库,通过融合数据变换与通信实现高效轻量的数据混洗。其核心洞见在于:MoE的专家主导数据布局与通信操作期望的设备主导布局存在冲突。FUSCO捕获细粒度数据布局,随后由流水线式通信引擎解析该布局,并沿通信路径高效执行所需的混洗操作。轻量级规划与负载均衡机制通过消除冗余通信及分散流量来增强引擎性能。在代表性基准测试上的评估表明,FUSCO相比NCCL和DeepEP(当前最先进的MoE通信库)分别实现了最高3.84$\times$和2.01$\times$的加速。在端到端MoE任务中,与NCCL和DeepEP相比,FUSCO将训练延迟降低1.17-1.39$\times$和1.10-1.19$\times$,并将推理中的首令牌生成延迟降低1.09-1.25$\times$和1.06-1.16$\times$。

0
下载
关闭预览

相关内容

【NeurIPS2019】图变换网络:Graph Transformer Network
误差反向传播——CNN
统计学习与视觉计算组
30+阅读 · 2018年7月12日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员