NAACL 2025long6 citations

Seq1F1B: Efficient Sequence-Level Pipeline Parallelism for Large Language Model Training

Sun Ao, Weilin Zhao, Xu Han, Cheng Yang, Xinrong Zhang, Zhiyuan Liu, Chuan Shi, Maosong Sun

Abstract

Training large language models (LLMs) heavily relies on distributed training strategies, among which pipeline parallelism (PP) plays a crucial role. As training sequences extend to 32k or even 128k tokens, current PP methods face severe bottlenecks, including substantial pipeline bubbles and high memory footprint, greatly hindering training throughput and model scalability. This paper introduces a sequence-level one-forward-one-backward (1F1B) PP method, named Seq1F1B, tailored for training LLMs on long sequences with high training throughput and memory efficiency. Unlike typical PP methods, which adopt batch-level pipeline schedule, Seq1F1B schedules the pipeline of training LLMs at the sequence level. It uses a computational strategy to partition sequences appropriately, significantly reducing pipeline bubbles and memory footprint. Compared to competitive PP baselines such as Megatron 1F1B PP, Seq1F1B achieves 1.14X training throughput with half memory footprint.Notably, Seq1F1B trains an LLM with 30B parameters on sequences up to 64k tokens using 64X NVIDIA A100 GPUs without using recomputation strategies, a feat unachievable with existing methods.We have released our code on GitHub to facilitate further research and development in LLM training on long sequences: https://github.com/thunlp/Seq1F1B.

BibTeX
@inproceedings{ao-etal-2025-seq1f1b,
    title = "{S}eq1{F}1{B}: Efficient Sequence-Level Pipeline Parallelism for Large Language Model Training",
    author = "Ao, Sun  and
      Zhao, Weilin  and
      Han, Xu  and
      Yang, Cheng  and
      Zhang, Xinrong  and
      Liu, Zhiyuan  and
      Shi, Chuan  and
      Sun, Maosong",
    editor = "Chiruzzo, Luis  and
      Ritter, Alan  and
      Wang, Lu",
    booktitle = "Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)",
    month = apr,
    year = "2025",
    address = "Albuquerque, New Mexico",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.naacl-long.454/",
    pages = "8998--9008",
    ISBN = "979-8-89176-189-6"
}
Seq1F1B: Efficient Sequence-Level Pipeline Parallelism for Large Language Model Training · NAACL 2025