EAHP: An Efficient Automatic Hybrid Parallelism Approach with Genetic Algorithm
摘要
Hybrid parallelism has been widely adopted due to the expansion of large language models (LLMs). Developing an effective strategy is crucial for improving the training performance of this approach. However, current parallel training frameworks fail to offer an efficient automatic search approach to identify the optimal strategy owing to the enormous search space. To address this challenge, we propose EAHP, an efficient automatic hybrid parallelism approach encompassing a cost model and a hybrid parallelism planner. The cost model estimates the iteration time of various strategies through meticulous modeling of hybrid parallelism training processes, guiding the planner to search for the optimal strategy. Specifically, the planner formulates the search process as a linear programming model and employs a genetic algorithm-based heuristic to reduce the extensive search space. Experimental results show that EAHP accelerates training by up to 1.43 \(\times \) compared to the state-of-the-art parallel training framework Merak for models beyond 10 billion parameters, and achieves a 2.82–13.95 \(\times \) reduction in search time for identifying the optimal strategy compared to AMP within the same search space.