arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.00599cs.DCcs.LG
收藏

Parm:利用专用调度高效训练大规模稀疏激活模型

Parm: Efficient Training of Large Sparsely-Activated Models with Dedicated Schedules

Data Science and Analytics Thrust, The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州)数据科学与分析学域);Hong Kong Baptist University(香港浸会大学);School of Computer Science and Technology, Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳)计算机科学与技术学院);Department of Computer Science and Engineering, The Hong Kong University of Science and Technology(香港科技大学计算机科学与工程学系)

Xinglin Pan, Wenxiang Lin, Shaohuai Shi, Xiaowen Chu, Weinong Sun, Bo Li

AI总结:

Parm 通过设计两种专用通信调度,消除冗余计算与通信并实现节点内外通信重叠,从而加速大规模稀疏激活 MoE 模型的 MP+EP+ESP 训练,实验表明其性能显著优于 DeepSpeed-MoE。

摘要:

稀疏激活的专家混合(MoE)层已在扩大大规模基础模型的模型规模方面得到实际应用,其计算需求仅呈亚线性增长。尽管模型并行、专家并行和专家分片并行(即 MP+EP+ESP)等混合并行范式被广泛用于在 GPU 集群上支持 MoE 模型训练,但训练效率受到这些并行范式引入的通信成本的制约。为解决这一局限,我们提出 Parm,一个通过设计两种专用调度来放置通信任务从而加速 MP+EP+ESP 训练的系统。所提出的调度消除了冗余的计算与通信,并实现节点内与节点间通信的重叠,最终减少整体训练时间。由于两种调度并非互斥,我们提供了全面的理论分析,并推导出一种自动且准确的方案,以确定在不同场景下应应用哪种调度。在 8-GPU 服务器和 32-GPU 集群上的实验结果表明,Parm 优于最先进的 MoE 训练系统 DeepSpeed-MoE,在 1296 个手动配置的 MoE 层上实现了 1.13$\ imes$ 至 5.77$\ imes$ 的加速,并在基于 BERT 和 GPT-2 的两个真实 MoE 模型上取得了约 3$\ imes$ 的改进。

英文摘要:

Sparsely-activated Mixture-of-Expert (MoE) layers have found practical applications in enlarging the model size of large-scale foundation models, with only a sub-linear increase in computation demands. Despite the wide adoption of hybrid parallel paradigms like model parallelism, expert parallelism, and expert-sharding parallelism (i.e., MP+EP+ESP) to support MoE model training on GPU clusters, the training efficiency is hindered by communication costs introduced by these parallel paradigms. To address this limitation, we propose Parm, a system that accelerates MP+EP+ESP training by designing two dedicated schedules for placing communication tasks. The proposed schedules eliminate redundant computations and communications and enable overlaps between intra-node and inter-node communications, ultimately reducing the overall training time. As the two schedules are not mutually exclusive, we provide comprehensive theoretical analyses and derive an automatic and accurate solution to determine which schedule should be applied in different scenarios. Experimental results on an 8-GPU server and a 32-GPU cluster demonstrate that Parm outperforms the state-of-the-art MoE training system, DeepSpeed-MoE, achieving 1.13$\times$ to 5.77$\times$ speedup on 1296 manually configured MoE layers and approximately 3$\times$ improvement on two real-world MoE models based on BERT and GPT-2.

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

↑