arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2401.13920cs.LGcs.AIcs.CL
收藏

LocMoE:一种用于大语言模型训练的低开销MoE

LocMoE: A Low-Overhead MoE for Large Language Model Training

Huawei Technologies Co., Ltd(华为技术有限公司)

Jing Li, Zhijie Sun, Xuan He, Li Zeng, Yi Lin, Entong Li, Binfan Zheng, Rongqian Zhao, Xin Chen

AI总结:

LocMoE提出结合负载均衡与局部性的路由策略,将部分节点间通信转为节点内通信,并确定专家容量最小阈值,在昇腾集群上使训练时间每轮减少12.68%-22.24%,且不影响模型准确率。

摘要:

混合专家(MoE)模型是一种广泛用于大语言模型(LLM)的分布式集成学习方法,因其能够高效地稀疏化和扩展模型而受到青睐。然而,MoE的性能受到负载不均衡和全对全(All-to-All)通信高延迟的限制,同时由于较大的专家容量导致相对冗余的计算。负载不均衡可能源于现有的路由策略,这些策略往往倾向于选择某些专家。全对全过程中的频繁节点间通信也显著延长了训练时间。为了缓解上述性能问题,我们提出了一种新颖的路由策略,通过将部分节点间通信转换为节点内通信,结合了负载均衡和局部性。值得注意的是,我们阐明了专家容量存在一个最小阈值,该阈值通过专家门控权重与分配令牌之间的最大角度偏差计算得出。我们将这些修改移植到基于MindSpore框架、具有多级路由的PanGu-Sigma模型上,并在昇腾集群上进行了实验。实验结果表明,与经典路由器(如哈希路由器和交换机路由器)相比,所提出的LocMoE在不影响模型准确率的情况下,将每个训练周期的训练时间减少了12.68%至22.24%。

英文摘要:

The Mixtures-of-Experts (MoE) model is a widespread distributed and integrated learning method for large language models (LLM), which is favored due to its ability to sparsify and expand models efficiently. However, the performance of MoE is limited by load imbalance and high latency of All-to-All communication, along with relatively redundant computation owing to large expert capacity. Load imbalance may result from existing routing policies that consistently tend to select certain experts. The frequent inter-node communication in the All-to-All procedure also significantly prolongs the training time. To alleviate the above performance problems, we propose a novel routing strategy that combines load balance and locality by converting partial inter-node communication to that of intra-node. Notably, we elucidate that there is a minimum threshold for expert capacity, calculated through the maximal angular deviation between the gating weights of the experts and the assigned tokens. We port these modifications on the PanGu-Sigma model based on the MindSpore framework with multi-level routing and conduct experiments on Ascend clusters. The experiment results demonstrate that the proposed LocMoE reduces training time per epoch by 12.68% to 22.24% compared to classical routers, such as hash router and switch router, without impacting the model accuracy.

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

↑