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

DreamDDP:利用逐层调度的部分同步加速数据并行分布式 LLM 训练

DreamDDP: Accelerating Data Parallel Distributed LLM Training with Layer-wise Scheduled Partial Synchronization

Zhenheng Tang, Zichen Tang, Junlin Huang, Xinglin Pan, Rudan Yan, Yuxin Wang, Amelie Chi Zhou, Shaohuai Shi, Xiaowen Chu, Bo Li

AI总结:

针对低带宽地理分布 DDP 中通信瓶颈,本文提出 DreamDDP,通过逐层部分同步、无额外显存的通信计算重叠及细粒度调度,实现 1.49×–3.91× 加速。

摘要:

大型语言模型(LLM)的规模增长,加大了在不同数据中心的多个 GPU 上加速分布式训练的挑战。此外,对数据隐私和数据枯竭的担忧提升了人们对地理分布数据中心的兴趣。在低带宽环境中,采用随机梯度下降(S-SGD)的地理分布数据并行训练(DDP)里,通信是主要瓶颈。Local SGD 通过降低同步频率来缓解通信开销,近期研究已成功将其应用于 LLM 的地理分布预训练。然而,我们发现其模型同步机制阻碍了通信与计算的重叠,使系统失去了重叠通信和计算的机会。为克服这一限制,我们通过按层解耦模型同步扩展了 Local SGD 的设计空间:在每次迭代中,仅同步部分层,而不是在特定迭代次数后同步整个模型。基于该方法,我们提出 DreamDDP,这是一个用于加速低带宽分布式训练的框架,具有三项关键创新:(1)部分 Local SGD,其收敛速率可与 S-SGD 相比,并具备理论保证;(2)在不占用额外 GPU 内存的情况下,使参数同步与计算重叠;(3)基于对逐层通信和计算时间的细粒度剖析,识别并利用三种性质来调度通信与计算,以减少训练时间。在 32 个 GPU 上使用 ResNet-18、ResNet-50、GPT-2 和 Llama-2 等主流深度学习模型进行的实证评估表明,DreamDDP 改善了 Local SGD(以及 Adam)的收敛特性,并相对于领先的基线方法实现了 1.49× 至 3.91× 的加速。

英文摘要:

The growth of large language models (LLMs) increases challenges of accelerating distributed training across multiple GPUs in different data centers. Moreover, concerns about data privacy and data exhaustion have heightened interest in geo-distributed data centers. Communication in geo-distributed data parallel training (DDP) with stochastic gradient descent (S-SGD) is the main bottleneck in low-bandwidth environments. Local SGD mitigates communication overhead by reducing synchronization frequency, and recent studies have successfully applied it to geo-distributedly pre-train LLMs. However, we identify that its model synchronization mechanism prevents overlapping communication and computation, which makes the system lose opportunities to overlap communication and computation. To overcome this limitation, we expand the design space of local SGD by layer-wisely decoupling model synchronization. In each iteration, only some layers are synchronized instead of the entire model after a specific number of iterations. Leveraging this methodology, we introduce DreamDDP, a training framework to accelerate low-bandwidth distributed training with three key innovations: (1) partial local SGD with theoretical assurances of convergence rates comparable to S-SGD; (2) overlapping parameter synchronization with computation without extra GPU memory occupation; (3) identifying and exploiting three properties to schedule the communication and computation to reduce the training time based on fine-grained profiling of layer-wise communication and computation time. Empirical evaluations conducted on 32 GPUs using prominent deep learning models, including ResNet-18, ResNet-50, GPT-2, and Llama-2, demonstrate that DreamDDP enhances the convergence properties of Local SGD (and Adam) and achieves speedups ranging from $1.49\times$ to $3.91\times$ over leading baseline methods.

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

↑