Skip to main content
QUICK REVIEW

[Paper Review] Decentralized Training of Foundation Models in Heterogeneous Environments

Binhang Yuan, Yongjun He|arXiv (Cornell University)|Jun 2, 2022
Stochastic Gradient Optimization TechniquesComputer Science23 citations
TL;DR

This paper presents a scheduler and system optimizations for training GPT-style foundation models across geo-distributed, heterogeneous GPUs, achieving substantial speedups over centralized baselines.

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).

Motivation & Objective

  • Motivate decentralized, heterogeneous-network training of large foundation models to reduce reliance on expensive data-center clusters.
  • Formulate the tasklet-to-device allocation problem for pipeline and data parallelism in heterogeneous settings.
  • Develop a cost model and an optimization algorithm to minimize communication costs in decentralized training.
  • Demonstrate system-level optimizations that hide communication within computation to improve throughput.
  • Evaluate the approach on geo-distributed GPU clusters simulating real network measurements.

Proposed method

  • Model the training as a set of tasklets (micro-batch, layer stage) assigned to devices.
  • Decompose communication cost into data-parallel and pipeline-parallel components using a two-level cost model.
  • Formulate DataP-Cost and PipelineP-Cost with a coarsened graph and an open-loop traveling salesman problem.
  • Use a hybrid genetic algorithm with specialized local search to find near-optimal allocations.
  • Introduce system-level optimizations that pipeline communications with computations across CUDA streams.

Experimental results

Research questions

  • RQ1How to allocate decentralized GPU tasklets to minimize communication cost in a heterogeneous network?
  • RQ2How to model data-parallel and pipeline-parallel communication costs under heterogeneity?
  • RQ3Can an evolutionary scheduling approach find allocations that outperform random or Kernighan-Lin strategies?
  • RQ4What is the impact of scheduler and system optimizations on end-to-end training throughput in geo-distributed settings?
  • RQ5How close can decentralized training approach data-center baselines in performance?

Key findings

  • The proposed scheduler and system optimizations yield 3.8–4.8x faster end-to-end training than state-of-the-art centralized systems in world-wide geo-distributed settings.
  • In world-wide geo-distributed scenarios, the method is 4.8x faster than Megatron-1.3B and 3.6x faster than Deepspeed for GPT3-1.3B training.
  • Without scheduler, performance gains drop, with ablations showing up to 2.7x slower results.
  • The decentralized approach is only 1.7–3.5x slower than Megatron/Deepspeed in data center conditions, despite networks up to 100x slower.
  • System optimizations enabling communication-computation overlap further improve throughput, and the scheduler significantly contributes to speedups over random allocations.
  • Ablation studies show the local search tailored to the cost model outperforms standard Kernighan-Lin-based search.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.