DCLGDec 2, 2024

FlexSP: Accelerating Large Language Model Training via Flexible Sequence Parallelism

arXiv:2412.01523v324 citationsh-index: 17ASPLOS
Originality Highly original
AI Analysis

This addresses a practical bottleneck in distributed LLM training for researchers and engineers dealing with real-world datasets with variable sequence lengths.

The paper tackles the inefficiency of existing sequence parallelism methods for large language model training when handling variable-length sequences, proposing a heterogeneity-adaptive approach that dynamically assigns optimal scattering strategies based on workload characteristics, achieving up to 1.98x speedup over state-of-the-art frameworks.

Extending the context length (i.e., the maximum supported sequence length) of LLMs is of paramount significance. To facilitate long context training of LLMs, sequence parallelism has emerged as an essential technique, which scatters each input sequence across multiple devices and necessitates communication to process the sequence. In essence, existing sequence parallelism methods assume homogeneous sequence lengths (i.e., all input sequences are equal in length) and therefore leverages a single, static scattering strategy for all input sequences. However, in reality, the sequence lengths in LLM training corpora exhibit substantial variability, often following a long-tail distribution, which leads to workload heterogeneity. In this paper, we show that employing a single, static strategy results in inefficiency and resource under-utilization, highlighting the need for adaptive approaches to handle the heterogeneous workloads across sequences. To address this, we propose a heterogeneity-adaptive sequence parallelism method. For each training step, our approach captures the variability in sequence lengths and assigns the optimal combination of scattering strategies based on workload characteristics. We model this problem as a linear programming optimization and design an efficient and effective solver to find the optimal solution. Furthermore, we implement our method in a high-performance system that supports adaptive parallelization in distributed LLM training. Experimental results demonstrate that our system outperforms state-of-the-art training frameworks by up to 1.98x.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes