Galvatron: Efficient Transformer Training over Multiple GPUs Using Automatic Parallelism

Xupeng Miao, Yujie Wang, Youhe Jiang, Chunan Shi, Xiaonan Nie +2 more
11/25/2022
cs.LGcs.DBcs.DC

Official code: PKU-DAIR/Hetu (339 stars, Apache-2.0, last commit 2025-12-13).

Abstract

Transformer models have achieved state-of-the-art performance on various domains of applications and gradually becomes the foundations of the advanced large deep learning (DL) models. However, how to train these models over multiple GPUs efficiently is still challenging due to a large number of parallelism choices. Existing DL systems either rely on manual efforts to make distributed training plans or apply parallelism combinations within a very limited search space. In this approach, we propose Galvatron, a new system framework that incorporates multiple popular parallelism dimensions and automatically finds the most efficient hybrid parallelism strategy. To better explore such a rarely huge search space, we 1) involve a decision tree to make decomposition and pruning based on some reasonable intuitions, and then 2) design a dynamic programming search algorithm to generate the optimal plan. Evaluations on four representative Transformer workloads show that Galvatron could perform automatically distributed training with different GPU memory budgets. Among all evluated scenarios, Galvatron always achieves superior system throughput compared to previous work with limited parallelism.

View on arXivView PDF

Code Implementations(1)

PKU-DAIR/HetuOfficial100%
Apache-2.0

A high-performance distributed deep learning system targeting large-scale and automated distributed training.

33943C, C++Jul 18, 202110 months agoApache-2.0
artificial-intelligenceautograddata-sciencedeep-learningdeep-neural-networks+8 more

Cite this paper

@article{miao2022galvatron,
  title  = {Galvatron: Efficient Transformer Training over Multiple GPUs Using Automatic Parallelism},
  author = {Xupeng Miao and Yujie Wang and Youhe Jiang and Chunan Shi and Xiaonan Nie and Hailin Zhang and Bin Cui},
  year   = {2022},
  eprint = {2211.13878},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.13878}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.13878.svg)](https://codeofpaper.com/paper/2211.13878)

Discussion