NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Galvatron: An Automatic Distributed System for Efficient Foundation Model Training

Xinyi Liu, Yujie Wang, Shenhan Zhu, Fangcheng Fu, Qingshuo Liu, Guangming Lin, Bin CuiarXiv 2025 · DOI

TL;DR

Training massive foundation models is incredibly complex due to the need for intricate distributed systems. Galvatron automates this by intelligently finding the best combination of parallelism strategies (data, tensor, pipeline, etc.) for your specific hardware and model, significantly boosting training efficiency. This open-source system makes advanced distributed training accessible and achieves state-of-the-art performance.

What Problem Does This Paper Address?

Training large-scale foundation models, especially language models (LLMs), has become crucial for achieving state-of-the-art performance. However, scaling these models requires sophisticated distributed training techniques. These techniques involve various parallelism strategies like data, tensor, pipeline, sharded data, and sequence parallelism, each with its own trade-offs in terms of memory, computation, and communication. Manually selecting the optimal hybrid combination of these strategies for a given model architecture, hardware setup, and training configuration is a daunting task, often requiring deep expertise and extensive manual tuning. Existing frameworks like DeepSpeed and Megatron-LM often rely on expert knowledge, leading to suboptimal results and high adoption barriers. This paper addresses the challenge of automatically finding the most efficient, fine-grained hybrid parallelism strategy to simplify and accelerate the training of foundation models.

Methods

Galvatron tackles this problem with a three-module system:

  • Profiler: This module analyzes both the hardware (inter-device communication bandwidth, single-device throughput) and the model (computational patterns, memory requirements per layer). This provides crucial data for building accurate cost models.
  • Search Engine: This is the core decision-making component. It uses the profiled data to build a cost model and then employs decision trees and dynamic programming to explore the vast space of possible parallelism strategies. It prunes infeasible configurations and identifies the optimal hybrid strategy that balances memory usage, computation, and communication overhead for each layer of the model.
  • Runtime: This module efficiently implements the identified hybrid parallelism strategies. It encapsulates various parallelism types (data, tensor, pipeline, sharded data, sequence) and even treats recomputation as a parallel dimension. The runtime allows users to integrate Galvatron with minimal code changes by providing APIs to construct the hybrid parallel model based on the configurations found by the search engine.

Datasets

Not discussed in the paper. The paper focuses on the system's ability to train various foundation models, including LLMs like Llama, GPT, and Qwen, on different hardware configurations.

Key Insights and Ideas

  • Layer-wise Fine-Grained Parallelism: The most impactful idea is enabling independent parallelism strategies for each layer of a Transformer model. This allows for much finer control and optimization than applying a single strategy across the entire model.
  • Automated Strategy Discovery: The core innovation is automating the complex process of finding the optimal hybrid parallelism strategy. This removes the need for expert manual tuning, democratizing efficient distributed training.
  • Holistic Cost Modeling: Galvatron's profiler and search engine work together to create accurate cost models that consider computation, memory, and communication, leading to more informed strategy selection.
  • Recomputation as a Parallel Dimension: Treating recomputation as a distinct parallel dimension further expands the optimization space, allowing for trade-offs between memory and computation.

Key Results

Galvatron demonstrates significant improvements in training throughput compared to existing frameworks like Megatron and DeepSpeed. Benchmarking on various clusters with NVIDIA H100, A100, and 4090 GPUs shows:

  • Up to 1.26-1.47x higher throughput compared to manually tuned Megatron and DeepSpeed.
  • Consistent superior efficiency across different cluster and model configurations, attributed to its automatic adjustment of fine-grained parallelism.
  • The system is capable of handling "out of memory" (OOM) errors by finding strategies that fit within memory constraints.

Limitations and Future Work

  • Limitations: The paper mentions that while Galvatron simplifies adoption, some manual intervention might still be needed for highly specialized scenarios. The "OOM" indicator in the benchmark figures suggests that while it can avoid OOM errors, it might not always find a solution if the model is fundamentally too large for the available hardware.
  • Future Work: The paper highlights that Galvatron has been adopted in industrial applications and academic research, suggesting ongoing development and broader impact. The open-source nature and comprehensive documentation imply a path for community contributions and further feature development. Specific future research directions are not explicitly detailed but are implied by the system's capabilities and the ongoing evolution of foundation models.

Summary updated

BibTeX
@misc{liu2025galvatron,
  author = {Xinyi Liu and Yujie Wang and Shenhan Zhu and Fangcheng Fu and Qingshuo Liu and Guangming Lin and Bin Cui},
  title = {{Galvatron: An Automatic Distributed System for Efficient Foundation Model Training}},
  year = {2025},
  eprint = {2504.21411},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.21411},
}
Figure