HAPT: Heterogeneity-Aware Automated Parallel Training on Heterogeneous Clusters

Antian Liang, Zhigang Zhao, Kai Zhang, Xuri Shi, Chuantao Li, Chunxiao Wang, Zhenying He, Yinan Jing, X. Sean Wang · DOI

Abstract

Training Large Language Models (LLMs) typically requires massive, uniform GPU clusters. However, many organizations rely on heterogeneous "Frankenstein clusters" with mixed hardware and varying network speeds. HAPT is an automated parallel training framework that addresses these challenges through a fine-grained workload planner and an adaptive microbatch scheduler. By optimizing for hardware diversity, HAPT achieves 1.3×–1.6× higher performance than existing state-of-the-art frameworks.

Introduction: The Challenge of Heterogeneous Clusters

Training state-of-the-art models like LLaMA-3 demands immense computational power. While industry leaders utilize uniform clusters of identical GPUs, smaller research labs often accumulate hardware incrementally. This leads to "heterogeneous clusters"—environments where older GPUs (e.g., NVIDIA V100) coexist with newer ones (e.g., A100, H100), connected by a mix of high-speed InfiniBand and slower Ethernet links.

Figure 1: Example of a heterogeneous cluster architecture with mixed GPU types and varying network bandwidths.

Existing distributed training frameworks, such as Megatron-LM or Alpa, are designed for homogeneity. They typically distribute workloads equally across all devices. In a mixed-hardware environment, this approach fails: faster GPUs remain idle while waiting for slower ones (load imbalance), and low-bandwidth network links between sub-clusters become bottlenecks that stall the entire pipeline.

Methodology

HAPT introduces two core innovations to mitigate the inefficiencies of heterogeneous hardware:

1. Fine-grained Inter-operator Strategy Planner

Traditional planners group model operators into coarse layers to simplify the search for a parallel strategy. HAPT argues that this granularity is insufficient for heterogeneous clusters. HAPT utilizes a Zero-Redundant Profiler to identify repeated modules (like Transformer blocks) and prune the search space. It then employs a Dynamic Programming (DP) algorithm with system-level optimizations—such as sparsity indexing and bidirectional pruning—to find a balanced workload distribution at a much finer granularity. For instance, instead of assigning whole layers, HAPT can assign precise percentages of work to match the specific performance profiles of different GPU nodes.

2. Heterogeneity-Aware 1F1B Scheduler (H-1F1B)

In pipeline parallelism, the standard "1F1B" (one-forward-one-backward) schedule does not account for varying network latencies. HAPT's H-1F1B scheduler adaptively determines the number of "extra" microbatches to launch during the warm-up phase based on interconnect latency. By launching more microbatches on slower links (e.g., 5 Gbps Ethernet), HAPT creates a buffer that maximizes the overlap between computation and communication, effectively "hiding" network delays.

Figure 6: Comparison of different parallel strategies and scheduling. (a) Coarse granularity leads to load imbalance. (b) Fine-grained planning improves balance. (c) Eager-1F1B scheduling overlaps communication.

Key Insights: The "Stretching" Concept

To manage GPUs of varying speeds, HAPT conceptually "stretches" the execution time of faster stages to match the slowest stage ($t_{max}$). This mathematical abstraction allows the scheduler to reach the theoretical upper bound of communication hiding. The paper demonstrates that planning at a fine-grained level (e.g., 146 layers vs. 8 layers) allows for precise workload allocation, such as assigning exactly 17.2% of the work to a slower sub-cluster to maintain peak throughput across the rest of the system.

Evaluation and Results

The authors evaluated HAPT using GPT-style models (15B to 39B parameters) on a 64-GPU heterogeneous cluster (A100s and V100s) with emulated cross-cluster network speeds of 1–10 Gbps.

  • Throughput Gains: HAPT consistently outperformed HexiScale (the previous state-of-the-art) by 1.3× to 1.6×.
  • Efficiency: HAPT maintained approximately 83% of the throughput of a fully optimized homogeneous setup, despite the inherent network bottlenecks of the heterogeneous cluster.
  • Search Scalability: Optimization techniques reduced the strategy planning overhead from over 100 hours to just 23 minutes.

Conclusion and Future Work

HAPT demonstrates that automated parallel training can effectively bridge the gap in heterogeneous hardware environments. While current results are promising, future work could integrate specialized kernels like FlashAttention to further boost performance. Additionally, addressing "performance jitter" in multi-tenant environments and scaling to thousands of GPUs across wide-area networks remain significant open challenges.

Summary updated

BibTeX
@inproceedings{liang2026hapt,
  author = {Antian Liang and Zhigang Zhao and Kai Zhang and Xuri Shi and Chuantao Li and Chunxiao Wang and Zhenying He and Yinan Jing and X. Sean Wang},
  title = {{HAPT: Heterogeneity-Aware Automated Parallel Training on Heterogeneous Clusters}},
  booktitle = {EuroSys},
  year = {2026},
  doi = {10.1145/3767295.3803603},
}
Figure