Lune

USENIX ATC2025Top-tier venue

FlexPipe: Maximizing Training Efficiency for Transformer-based Models with Variable-Length Inputs

Hairui Zhao, Qi Tian, Hongliang Li, Zizhong Chen

Abstract

Transformer achieves promising results among various deep learning architectures. Training transformer-based models (transformers) typically involves various parallelisms, such as data parallelism and pipeline parallelism (PP). Variable-length datasets have been adopted to facilitate multi-task training of transformers, which degrades training efficiency. Though many efforts have significantly improved the variable-length training, these efforts primarily focus on optimizations within a single iteration. However, substantial fluctuations of computation and memory requirements across iterations can also lead to inefficiency overall due to the static partitioning of distributed frameworks. Thus, this paper proposes FlexPipe from the perspective of a distributed system to enable high throughput variable-length training of transformers. To our knowledge, FlexPipe is the first flexible pipeline framework that dynamically adjusts PP by a live flexibility mechanism without training loss. We introduce a novel problem which aims at maximizing training throughput by adjusting the parallel configurations, along with an efficient heuristic algorithm to solve the problem. Extensive experiments show that Flex-Pipe achieves an average 1.25× training throughput compared to state-of-the-art methods.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Flan Collection: Designing Data and Methods for Effective Instruction Tuning cites Multitask Prompted Training Enables Zero-Shot Task Generalization
  • The Flan Collection: Designing Data and Methods for Effective Instruction Tuning cites Cross-Task Generalization via Natural Language Crowdsourcing Instructions
  • ElasticMM: Efficient Multimodal LLMs Serving with Elastic Multimodal Parallelism cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Cross-Task Generalization via Natural Language Crowdsourcing Instructions cites Multitask Prompted Training Enables Zero-Shot Task Generalization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. ElasticMM: Efficient Multimodal LLMs Serving with Elastic Multimodal ParallelismZedong Liu, Shenggan Cheng, Guangming Tan, Yang You et al.NeurIPS 2025 · 12 citations
  2. DIP: Efficient Large Multimodal Model Training with Dynamic Interleaved PipelineZhenliang Xue, Hanpeng Hu, Xing Chen, Yimin Jiang et al.ASPLOS 2026 · 1 citation
  3. CCL-D: A High-Precision Diagnostic System for Slow and Hang Anomalies in Large-Scale Model TrainingYida Gu, Fakang Wang, Jianhao Fu, Zhenhang Sun et al.PPoPP 2026

Builds on25

  1. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  2. Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations
  3. The Flan Collection: Designing Data and Methods for Effective Instruction TuningShayne Longpre, Le Hou, Tu Vu, Albert Webson et al.ICML 2023 · 908 citations
  4. Cross-Task Generalization via Natural Language Crowdsourcing InstructionsSwaroop Mishra, Daniel Khashabi, Chitta Baral, Hannaneh HajishirziACL 2022 · 887 citations
  5. Efficient large-scale language model training on GPU clusters using megatron-LMDeepak Narayanan, Mohammad Shoeybi, Jared Casper, Patrick LeGresley et al.SC 2021 · 576 citations

Related papers

  1. HelixPipe: Efficient Distributed Training of Long Sequence Transformers with Attention Parallel Pipeline ParallelismGeng Zhang, Shenggan Cheng, Xuanlei Zhao, Ziming Liu et al.PPoPP 2026 · 3 citations
  2. MixPipe: Efficient Bidirectional Pipeline Parallelism for Training Large-Scale ModelsWeigang Zhang, Biyu Zhou, Xuehai Tang, Zhaoxing Wang et al.DAC 2023 · 9 citations
  3. DynaPipe: Optimizing Multi-task Training through Dynamic PipelinesChenyu Jiang, Zhen Jia, Shuai Zheng, Yida Wang et al.EuroSys 2024 · 10 citations
  4. WeiPipe: Weight Pipeline Parallelism for Communication-Effective Long-Context Large Model TrainingJunfeng Lin, Ziming Liu, Yang You, Jun Wang et al.PPoPP 2025 · 5 citations
  5. AdaptPipe: Mitigating Runtime Bubbles via Granularity-Adaptive Scheduling under Memory ConstraintsYumeng Cui, Jessie Hui Wang, Najila Liu, Ling Deng et al.INFOCOM 2026
Dusk over the sea between two cliffs drawn in fine vertical lines