[论文解读] AutoDDL: Automatic Distributed Deep Learning with Near-Optimal Bandwidth Cost
AutoDDL 是一个用于自动分布式深度学习的框架,通过利用 OneFlow 的 SBP 张量抽象与一种新颖的部分和(Partial-Sum)状态,实现了渐近最优的通信开销。它采用详尽的性能模型与启发式搜索,以寻找接近最优的、每层独立的并行化策略,与专家调优的 Megatron 相比,VGG 模型的端到端训练时间最多可减少 71.5%。
Recent advances in deep learning are driven by the growing scale of computation, data, and models. However, efficiently training large-scale models on distributed systems requires an intricate combination of data, operator, and pipeline parallelism, which exerts heavy burden on machine learning practitioners. To this end, we propose AutoDDL, a distributed training framework that automatically explores and exploits new parallelization schemes with near-optimal bandwidth cost. AutoDDL facilitates the description and implementation of different schemes by utilizing OneFlow's Split, Broadcast, and Partial Sum (SBP) abstraction. AutoDDL is equipped with an analytical performance model combined with a customized Coordinate Descent algorithm, which significantly reduces the scheme searching overhead. We conduct evaluations on Multi-Node-Single-GPU and Multi-Node-Multi-GPU machines using different models, including VGG and Transformer. Compared to the expert-optimized implementations, AutoDDL reduces the end-to-end training time by up to 31.1% and 10% for Transformer and up to 17.7% and 71.5% for VGG on the two parallel systems, respectively.
研究动机与目标
- 解决大规模深度学习模型分布式训练中通信开销过高的挑战。
- 克服现有框架因搜索空间受限而导致通信策略次优的局限性。
- 通过集成性能建模与启发式搜索,实现自动、高效且可扩展的分布式训练,最大限度减少用户干预。
- 在多种模型架构与硬件配置下,实现渐近最优的通信开销。
- 提供一种实用的自动化解决方案,在真实场景中优于 Megatron 和 Summa 等专家优化基线。
提出的方法
- 利用 OneFlow 的 Split、Broadcast 和 Partial Sum(SBP)张量抽象,定义一个新型且扩展的分布式训练策略搜索空间。
- 引入部分和张量状态,以支持通信避免算法,实现渐近最优性,类似于 2.5D DMM。
- 构建详细的性能模型,用于估算搜索空间中每种候选策略的通信与计算开销。
- 实现启发式搜索算法,以高效探索庞大的策略空间,并识别接近最优的配置。
- 利用 OneFlow 对 SBP 操作的原生支持,自动化生成配置与代码合成。
- 集成流水线并行机制,支持每层策略选择,以适应不同层的大小与结构差异。
实验结果
研究问题
- RQ1能否定义一个系统化的搜索空间,涵盖深度神经网络渐近通信最优的分布式训练策略?
- RQ2如何在保持接近最优通信开销的前提下,使自动配置搜索高效且可扩展?
- RQ3在真实世界的分布式训练中,自动框架设计在多大程度上能超越专家调优的手动优化基线(如 Megatron)?
- RQ4在具有异构层结构的模型中,每层策略选择对整体训练效率有何影响?
- RQ5在 SBP 抽象中集成部分和状态,能否使通信避免算法达到理论下限?
主要发现
- 在多节点单 GPU 和多节点多 GPU 系统上,AutoDDL 分别将 Transformer 模型的端到端训练时间减少最多 31.1% 和 10%。
- 对于 VGG 模型,与 Megatron 相比,AutoDDL 在多节点单 GPU 和多节点多 GPU 系统上分别实现了最多 71.5% 和 17.7% 的训练时间减少。
- 所选的 AutoDDL 策略使中间激活通信开销几乎减半,一项实验中相对比值为 96:180。
- AutoDDL 的搜索过程在个人笔记本电脑上仅需几分钟即可完成,表明其开销低,具备真实部署的实用性。
- 在所有实验中,即使启用了流水线并行,AutoDDL 的表现仍优于 Megatron 和 Summa,归因于其优化的通信模式。
- 该框架成功识别出不同的、与层相关的策略(例如 VGG13 的最后三个全连接层采用不同分割方式),证明了每层优化的价值。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。