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

Pangu Ultra MoE:如何在昇腾NPU上训练你的大型MoE模型

Pangu Ultra MoE: How to Train Your Big MoE on Ascend NPUs

Pangu Team(文心团队)
Yehui Tang, Yichun Yin, Yaoyuan Wang, Hang Zhou, Yu Pan, Wei Guo, Ziyang Zhang, Miao Rang, Fangcheng Liu, Naifu Zhang, Binghan Li, Yonghan Dong, Xiaojun Meng, Y… 展开作者

Yehui Tang, Yichun Yin, Yaoyuan Wang, Hang Zhou, Yu Pan, Wei Guo, Ziyang Zhang, Miao Rang, Fangcheng Liu, Naifu Zhang, Binghan Li, Yonghan Dong, Xiaojun Meng, Yasheng Wang, Dong Li, Yin Li, Dandan Tu, Can Chen, Youliang Yan, Fisher Yu, Ruiming Tang, Yunhe Wang, Botian Huang, Bo Wang, Boxiao Liu, Changzheng Zhang, Da Kuang, Fei Liu, Gang Huang, Jiansheng Wei, Jiarui Qin, Jie Ran, Jinpeng Li, Jun Zhao, Liang Dai, Lin Li, Liqun Deng, Peifeng Qin, Pengyuan Zeng, Qiang Gu, Shaohua Tang, Shengjun Cheng, Tao Gao, Tao Yu, Tianshu Li, Tianyu Bi, Wei He, Weikai Mao, Wenyong Huang, Wulong Liu, Xiabing Li, Xianzhi Yu, Xueyu Wu, Xu He, Yangkai Du, Yan Xu, Ye Tian, Yimeng Wu, Yongbing Huang, Yong Tian, Yong Zhu, Yue Li, Yufei Wang, Yuhang Gai, Yujun Li, Yu Luo, Yunsheng Ni, Yusen Sun, Zelin Chen, Zhe Liu, Zhicheng Liu, Zhipeng Tu, Zilin Ding, Zongyuan Zhan

AI总结:

本文针对昇腾NPU上训练万亿级稀疏MoE大模型的挑战,通过仿真选型提出7180亿参数的Pangu Ultra MoE,并优化专家并行通信与内存效率,在6K昇腾NPU上实现30.0% MFU,性能媲美DeepSeek R1。

摘要:

具有专家混合(MoE)结构且参数规模接近万亿的稀疏大语言模型(LLM)正主导着最强语言模型领域。然而,巨大的模型规模对底层软件和硬件系统提出了重大挑战。本文旨在探索在昇腾NPU上驾驭如此规模模型的方法。关键目标是在动态稀疏模型结构下更好地利用计算资源,并在实际硬件上实现预期的性能增益。为了在不反复运行昂贵实验的情况下选择适合昇腾NPU的模型配置,我们利用仿真来比较各种模型超参数的权衡。这项研究催生了Pangu Ultra MoE,一个拥有7180亿参数的稀疏LLM,我们在该模型上进行了实验以验证仿真结果。在系统层面,我们深入研究专家并行(Expert Parallelism)以优化NPU设备之间的通信,从而减少同步开销。我们还优化了设备内的内存效率,以进一步降低参数和激活管理开销。最终,在6K昇腾NPU上训练Pangu Ultra MoE时,我们实现了30.0%的MFU,性能与DeepSeek R1相当,并证明了昇腾系统能够驾驭最先进语言模型的所有训练阶段。大量实验表明,我们的方法可以实现具有MoE结构的大规模稀疏语言模型的高效训练。我们还研究了此类模型的行为,以供未来参考。

英文摘要:

Sparse large language models (LLMs) with Mixture of Experts (MoE) and close to a trillion parameters are dominating the realm of most capable language models. However, the massive model scale poses significant challenges for the underlying software and hardware systems. In this paper, we aim to uncover a recipe to harness such scale on Ascend NPUs. The key goals are better usage of the computing resources under the dynamic sparse model structures and materializing the expected performance gain on the actual hardware. To select model configurations suitable for Ascend NPUs without repeatedly running the expensive experiments, we leverage simulation to compare the trade-off of various model hyperparameters. This study led to Pangu Ultra MoE, a sparse LLM with 718 billion parameters, and we conducted experiments on the model to verify the simulation results. On the system side, we dig into Expert Parallelism to optimize the communication between NPU devices to reduce the synchronization overhead. We also optimize the memory efficiency within the devices to further reduce the parameter and activation management overhead. In the end, we achieve an MFU of 30.0% when training Pangu Ultra MoE, with performance comparable to that of DeepSeek R1, on 6K Ascend NPUs, and demonstrate that the Ascend system is capable of harnessing all the training stages of the state-of-the-art language models. Extensive experiments indicate that our recipe can lead to efficient training of large-scale sparse language models with MoE. We also study the behaviors of such models for future reference.

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

↑