在昇腾NPU上训练7180亿参数稀疏模型,实现30%计算效率
Pangu Ultra MoE: How to Train Your Big MoE on Ascend NPUs
- 通过仿真优化超参,选择适配昇腾NPU的MoE模型配置
- 在6000个昇腾NPU上实现30.0% MFU,性能媲美DeepSeek R1
- 适合研究大规模稀疏模型训练与昇腾硬件优化的团队
具有专家混合(MoE)且接近万亿参数的稀疏大语言模型正主导最先进语言模型领域。然而,巨大模型规模对底层软硬件系统带来严峻挑战。本文旨在揭示如何在昇腾NPU上高效利用此类规模模型。核心目标是在动态稀疏模型结构下更优地使用计算资源,并在真实硬件上兑现预期性能收益。为避免反复进行昂贵实验,我们采用仿真比较不同模型超参数的权衡。该研究催生了拥有7180亿参数的Pangu Ultra MoE模型,并通过实验证实了仿真结果。系统层面,我们深入优化专家并行以减少NPU间通信开销,同时提升设备内内存效率,降低参数与激活管理负担。最终,在6000个昇腾NPU上训练时达到30.0% MFU,性能可比肩DeepSeek R1,证明昇腾系统能支持最先进的语言模型全流程训练。大量实验表明,该方案可实现大规模稀疏语言模型的高效训练,并为未来研究提供模型行为参考。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。