Skip to main content
QUICK REVIEW

[论文解读] Decentralized Training of Foundation Models in Heterogeneous Environments

Binhang Yuan, Yongjun He|arXiv (Cornell University)|Jun 2, 2022
Stochastic Gradient Optimization TechniquesComputer Science被引用 23
一句话总结

本论文提出一种调度器和系统优化,用于在跨地理分布、异质GPU的GPT风格基础模型训练,相对于集中基线实现显著加速。

ABSTRACT

Training foundation models, such as GPT-3 and PaLM, can be extremely expensive, often involving tens of thousands of GPUs running continuously for months. These models are typically trained in specialized clusters featuring fast, homogeneous interconnects and using carefully designed software systems that support both data parallelism and model/pipeline parallelism. Such dedicated clusters can be costly and difficult to obtain. Can we instead leverage the much greater amount of decentralized, heterogeneous, and lower-bandwidth interconnected compute? Previous works examining the heterogeneous, decentralized setting focus on relatively small models that can be trained in a purely data parallel manner. State-of-the-art schemes for model parallel foundation model training, such as Megatron, only consider the homogeneous data center setting. In this paper, we present the first study of training large foundation models with model parallelism in a decentralized regime over a heterogeneous network. Our key technical contribution is a scheduling algorithm that allocates different computational "tasklets" in the training of foundation models to a group of decentralized GPU devices connected by a slow heterogeneous network. We provide a formal cost model and further propose an efficient evolutionary algorithm to find the optimal allocation strategy. We conduct extensive experiments that represent different scenarios for learning over geo-distributed devices simulated using real-world network measurements. In the most extreme case, across 8 different cities spanning 3 continents, our approach is 4.8X faster than prior state-of-the-art training systems (Megatron).

研究动机与目标

  • 推动在分散的、异质网络中对大型基础模型进行训练,以降低对昂贵数据中心集群的依赖。
  • 在异质设置下为流水线与数据并行的任务单到设备分配问题建模。
  • 开发一个成本模型和优化算法,以最小化去中心化训练中的通信成本。
  • 展示系统级优化,将通信隐藏在计算中以提升吞吐量。
  • 在模拟真实网络测量的地理分布式GPU集群上评估该方法。

提出的方法

  • 将训练建模为一组分任务(微小批次、层级阶段)分配给设备。
  • 使用两层成本模型将通信成本分解为数据并行和流水线并行分量。
  • 使用简化图和开放环路旅行商问题来制定DataP-Cost和PipelineP-Cost。
  • 使用混合遗传算法并结合专门的局部搜索来寻找接近最优的分配。
  • 引入将通信与计算在CUDA流中管道化的系统级优化。

实验结果

研究问题

  • RQ1如何在异构网络中分配去中心化的GPU任务单以最小化通信成本?
  • RQ2在异质性条件下如何对数据并行和流水线并行通信成本进行建模?
  • RQ3进化调度方法是否能找到比随机或Kernighan-Lin策略更优的分配?
  • RQ4调度器与系统优化对地理分布设置的端到端训练吞吐量有何影响?
  • RQ5去中心化训练在性能上能接近数据中心基线到何种程度?

主要发现

  • 提出的调度器和系统优化使端到端训练在全球地理分布环境中比最先进的集中系统快3.8–4.8倍。
  • 在全球地理分布场景中,该方法在GPT3-1.3B训练中比Megatron-1.3B快4.8倍,比Deepspeed快3.6倍。
  • 没有调度器时性能提升下降,消融实验显示结果最多慢到2.7倍。
  • 去中心化方法在数据中心条件下仅比Megatron/Deepspeed慢1.7–3.5倍,尽管网络速度慢至多100倍。
  • 使通信与计算重叠的系统优化进一步提升吞吐量,调度器对比随机分配的加速贡献显著。
  • 消融研究表明,针对成本模型定制的局部搜索优于基于标准Kernighan-Lin的搜索。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。