Manuscript Offprint

arXiv:2609.06086

Poseidon: DAG-Guided Parallelism Search for LLM Pre-Training on Heterogeneous Clusters

Xiaosong Chen, Shaoheng Nie, Zhongmin Zhao, Zizhao Mo, Jiapeng Chen, Huanle Xu, Zeren Li, Weiwei Sun, ChengZhong Xu

Xiaosong Chen* University of Macau yc27909@connect.um.edu.mo

Zizhao Mo University of Macau yc17461@connect.um.edu.mo

Zeren Li† Independent researcher lzr010506@gmail.com

Shaoheng Nie* Fudan University shnie23@m.fudan.edu.cn

Jiapeng Chen Fudan University 22300240004@m.fudan.edu.cn

Weiwei Sun† Fudan University wwsun@fudan.edu.cn

Zhongmin Zhao University of Macau yc47494@connect.um.edu.mo

Huanle Xu† University of Macau huanlexu@um.edu.mo

ChengZhong Xu University of Macau czxu@um.edu.mo

*Equal contribution. †Corresponding authors.

Abstract

With the rapid advancement of accelerator technologies, pre-training large language models (LLMs) on heterogeneous accelerator clusters has become increasingly crucial for maximizing hardware utilization. Existing systems, however, suffer from inaccurate training time modeling, which undermines the parallelization optimizations built upon it. Moreover, for current approaches, the vast configuration search space makes exhaustive exploration infeasible, forcing a trade-off between search time and training efficiency.

To overcome these limitations, we introduce Poseidon, an efficient and scalable LLM training framework designed with heterogeneity awareness. Its core is an explicit training time model based on a directed acyclic graph. Building on this graph, Poseidon employs two efficient, theoretically grounded strategies: stage-level pruning via early stopping with partial estimation, and layer-to-stage mapping exploiting a ridge-like distribution pattern. These strategies reduce the search space without sacrificing optimal training efficiency. Experiments on heterogeneous clusters show that Poseidon improves training throughput by up to 2.76× over state-of-the-art systems.

1 Introduction

LLMs [1, 22, 41] have demonstrated unprecedented capabilities, advancing applications such as code completion [9, 42], story writing [52], and conversational agents [54]. However, the scaling law drives the development of increasingly larger foundational models to fully exploit their potential, requiring substantial computational power. For instance, training LLaMA-3 requires 3.8 × 10²⁵ FLOPs, as reported by Meta [8]. This has led to widespread deployment of accelerators such as GPUs [26] and NPUs [5] to support these resource-intensive workloads. Meanwhile, accelerators evolve through multiple generations, resulting in notable inter-generation heterogeneity. Computational power and

memory can vary significantly within the same accelerator class, leading to diverse training performance. For example, limited memory constrains batch sizes on older accelerators, while differences in computational power create significant gaps in training time for identical workloads.

To optimize cluster resource utilization, pre-training LLMs on heterogeneous accelerator devices has become increasingly important. Several studies have explored this problem [15, 43, 49], focusing on optimizing parallelization configurations to minimize training time on such resources. These configurations typically combine pipeline, tensor, and data parallelism to improve computational efficiency, reduce memory usage, and lower communication overhead.

However, accelerator heterogeneity introduces significant complexity in identifying optimal parallelization configurations. This is because configuration searching is exposed to a new dimension, where the solution space grows exponentially with the number of accelerator types involved. In witnessing this dilemma, existing works propose heuristic methods to balance searching time and training throughput. Although they reduce the searching time to some extent, we identify three key obstacles that can lead to low training efficiency. First, the cost models utilized by existing works to capture the training time are inaccurate. Since they cannot precisely characterize the overlap among concurrently proceeding operations, we demonstrate up to 1.32× deviation in our experimental testbed. Second, the heuristic pruning strategies, which serve as the key to reducing searching time, risk neglecting the optimal configuration. This is because the rigid strategies proposed cannot flexibly adapt to various cluster environments, where inter-accelerator connections and computational power gaps can be highly diverse. In this sense, we witness up to 1.91× degradation when evaluating the pruning strategies for baseline systems. Third, existing modeling techniques present low generalizability, due to the tight coupling with a specific training mode, i.e., 1F1B [28], where each pipeline stage alternates between executing one forward pass and one backward pass of micro-batches after pipeline warm-up. As a result, popular training variants, including Eager 1F1B [56] and Interleaved 1F1B [30], cannot be well supported by this design.

In this paper, we propose Poseidon, a novel LLM pre-training system designed to address the aforementioned limitations. Poseidon efficiently explores optimal parallel configurations across heterogeneous accelerator resources while maintaining low search overhead. To achieve this, it incorporates an explicit directed acyclic graph (DAG)-based training time estimation model that captures stage- and batch-level execution dependencies. This graph-based representation models the data execution order within each stage and the dependencies across micro-batches for arbitrary parallel training configurations, using distinct node and edge types. It enables training time estimation over heterogeneous resources by computing the longest path. Furthermore, the graph accounts for communication-computation overlap in heterogeneous environments, significantly enhancing the accuracy of training time predictions.

Leveraging this estimation framework, Poseidon integrates two optimization strategies to efficiently navigate the vast configuration search space. First, it employs stage-level pruning with early stopping, guided by a custom lower-bound function. This mechanism terminates the evaluation of sub-optimal configurations once partial stage analysis reveals inefficiencies, avoiding exhaustive search. Second, Poseidon exploits a ridge-like distribution pattern in layer-to-stage mapping to prune suboptimal regions of the search space. This approach, backed by theoretical guarantees, substantially accelerates search while guaranteeing optimal solutions. Together, these strategies enable Poseidon to achieve unprecedented efficiency in identifying optimal parallel configurations for LLM training over heterogeneous clusters. In summary, we have made the following contributions:

→ We introduce a novel DAG-based cost model for LLM training, capturing various factors and therefore enabling precise training time estimation. This model also offers high generalizability to multiple training variants.

→ We propose two pruning strategies for configuration exploration that are theoretically guaranteed to identify the optimal parallel configuration.

→ We evaluate Poseidon via extensive experiments on heterogeneous clusters. Results show that it consistently outperforms baselines, achieving up to 2.76× higher throughput.

References (42)