FlexSP: Accelerating Large Language Model Training via Flexible Sequence Parallelism
Yujie Wang, Shiju Wang, Shenhan Zhu, Fangcheng Fu, Xinyi Liu, Xuefeng Xiao, Huixia Li, Jiashi Li, Faming Wu, Bin Cui
摘要
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
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment 引用了 Language Models are Few-Shot Learners
- Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment 引用了 Malleus: Straggler-Resilient Hybrid Parallel Training of Large-scale Models via Malleable Data and Model Parallelization
- Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment 引用了 Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data Annotations
- Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data Annotations 引用了 Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment
- ResiHP: Taming LLM Training Failures with Dynamic Hybrid Parallelism 引用了 Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Big Bird: Transformers for Longer Sequences
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 Big Bird: Transformers for Longer Sequences
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Malleus: Straggler-Resilient Hybrid Parallel Training of Large-scale Models via Malleable Data and Model Parallelization 引用了 ZeRO: memory optimizations toward training trillion parameter models
- Malleus: Straggler-Resilient Hybrid Parallel Training of Large-scale Models via Malleable Data and Model Parallelization 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Malleus: Straggler-Resilient Hybrid Parallel Training of Large-scale Models via Malleable Data and Model Parallelization 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data Annotations 引用了 ZeRO: memory optimizations toward training trillion parameter models
- Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data Annotations 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data Annotations 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data Annotations 引用了 Malleus: Straggler-Resilient Hybrid Parallel Training of Large-scale Models via Malleable Data and Model Parallelization
引用它的顶会 Paper9
- Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data AssignmentHaoyang Li, Fangcheng Fu, Sheng Lin, Hao Ge 等SIGMOD 2026 · 7 次引用
- Hetu v2: A General and Scalable Deep Learning System with Hierarchical and Heterogeneous Single Program Multiple Data AnnotationsHaoyang Li, Fangcheng Fu, Hao Ge, Sheng Lin 等OSDI 2026 · 7 次引用
- Malleus: Straggler-Resilient Hybrid Parallel Training of Large-scale Models via Malleable Data and Model ParallelizationHaoyang Li, Fangcheng Fu, Hao Ge, Sheng Lin 等SIGMOD 2025 · 6 次引用
- ResiHP: Taming LLM Training Failures with Dynamic Hybrid ParallelismTenghui Ma, Jihu Guo, Wei Gao, Sitian Lu 等HPDC 2026
- PipeDiT: Accelerating Diffusion Transformers in Video Generation with Task Pipelining and Model DecouplingSijie Wang, Qiang Wang, Shaohuai ShiAAAI 2026
它引用的 Paper18
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
- ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 次引用
相关 Paper
- Skrull: Towards Efficient Long Context Fine-tuning through Dynamic Data SchedulingHongtao Xu, Wenting Shen, Yuanxin Wei, Ang Wang 等NeurIPS 2025 · 3 次引用
- Enabling Parallelism Hot Switching for Efficient Training of Large Language ModelsHao Ge, Fangcheng Fu, Haoyang Li, Xuanyu Wang 等SOSP 2024 · 4 次引用
- Efficient Long Context Fine-tuning with Chunk FlowXiulong Yuan, Hongtao Xu, Wenting Shen, Ang Wang 等ICML 2025
- ByteScale: Communication-Efficient Scaling of LLM Training with a 2048K Context Length on 16384 GPUsHao Ge, Junda Feng, Qi Huang, Fangcheng Fu 等SIGCOMM 2025 · 4 次引用
- ParaDySe: A Parallel Strategy Switching Framework for Dynamic Sequences in Transformer-based Large Language ModelsZhixin Ou, Peng Liang, Linbo Qiao, Jianchen Han 等AAAI 2026
