|
|
|
| Bidirectional interleaved pipeline parallelism for accelerating large model training |
Houming WU1,2( ),Ling CHEN1,2,*( ) |
1. State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou 310027, China 2. College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China |
|
|
|
Abstract Existing synchronous pipeline parallelism methods introduce substantial pipeline bubbles due to inter-stage dependencies and periodic parameter synchronization, which reduce device utilization and training efficiency. To address this limitation, a bidirectional interleaved pipeline parallelism method named BitPipe for accelerating large-scale model training was proposed. Within a unified framework, bidirectional pipeline execution and interleaved scheduling were integrated. A bidirectional interleaved pipeline scheduling mechanism was designed to improve the utilization of idle device time slots and support finer-grained stage scheduling. To alleviate the communication overhead incurred by increased parallelism, a V-shaped interleaved model partitioning strategy was introduced to convert part of cross-device communication into local memory access. In addition, device mapping and eager gradient synchronization were employed to enable effective overlap between computation and communication. The proposed method was implemented based on the Megatron-LM framework and evaluated on GPT-like and BERT-like models using up to 32 GPUs. Experimental results show that BitPipe achieves a training throughput improvement of 1.05×–1.28× compared with existing synchronous pipeline parallelism methods. Moreover, BitPipe effectively reduces pipeline bubbles and improves training efficiency in large-scale model training.
|
|
Received: 09 December 2025
Published: 16 October 2026
|
|
|
|
Corresponding Authors:
Ling CHEN
E-mail: houmingwu@zju.edu.cn;lingchen@cs.zju.edu.cn
|
加速大模型训练的双向交错流水线并行方法
现有同步流水线并行方法因阶段间依赖和周期性参数同步引入大量流水线空泡,降低了设备利用率和训练效率,为此提出加速大模型训练的双向交错流水线并行方法BitPipe. 在统一框架下融合双向流水线执行与交错调度,设计双向交错流水线调度机制,以提升设备空闲时隙的利用率并支持更细粒度的阶段调度. 为了缓解并行度提升带来的通信开销,引入V形交错式模型划分策略,将部分跨设备通信转化为本地显存访问,结合设备映射与提前梯度同步优化,实现计算与通信的有效重叠. 基于Megatron-LM框架,所提方法在最多32张GPU上对GPT类与BERT类模型进行实验评估. 结果表明,相较于现有同步流水线并行方法,BitPipe实现了1.05×~1.28×的训练吞吐率提升,有效降低了流水线空泡并提高了训练效率.
关键词:
深度学习,
分布式训练,
流水线并行,
双向流水线,
交错流水线
|
|
| [1] |
FARKAS A, KERTÉSZ G, LOVAS R. Parallel and distributed training of deep neural networks: a brief overview [C]// Proceedings of the IEEE 24th International Conference on Intelligent Engineering Systems. Reykjavík: IEEE, 2020: 165–170.
|
|
|
| [2] |
VERBRAEKEN J, WOLTING M, KATZY J, et al A survey on distributed machine learning[J]. ACM Computing Surveys, 2021, 53 (2): 1- 33
|
|
|
| [3] |
卢凯, 赖志权, 李笙维, 等 并行智能训练技术: 挑战与发展[J]. 中国科学: 信息科学, 2023, 53 (8): 1441- 1468 LU Kai, LAI Zhiquan, LI Shengwei, et al Parallel intelligent computing: development and challenges[J]. Scientia Sinica: Informationis, 2023, 53 (8): 1441- 1468
doi: 10.1360/SSI-2023-0051
|
|
|
| [4] |
LI M, ANDERSEN D G, SMOLA A, et al. Communication efficient distributed machine learning with the parameter server [C]// Proceeding of the 28th International Conference on Neural Information Processing Systems: Volume 1. Cambridge: MIT Press, 2014: 19–27.
|
|
|
| [5] |
LI S, ZHAO Y, VARMA R, et al. PyTorch distributed: experiences on accelerating data parallel training [EB/OL]. (2022−06−28)[2025−12−09]. https://arxiv.org/pdf/2006.15704.
|
|
|
| [6] |
NARAYANAN D, SHOEYBI M, CASPER J, et al. Efficient large-scale language model training on GPU clusters using megatron-LM [C]// Proceedings of the SC21: International Conference for High Performance Computing, Networking, Storage and Analysis. St. Louis: IEEE, 2022: 1–14.
|
|
|
| [7] |
HUANG Y, CHENG Y, BAPNA A, et al. GPipe: efficient training of giant neural networks using pipeline parallelism [EB/OL]. (2019−07−25)[2025−12−09]. https://arxiv.org/pdf/1811.06965.
|
|
|
| [8] |
NARAYANAN D, HARLAP A, PHANISHAYEE A, et al. PipeDream: generalized pipeline parallelism for DNN training [C]// Proceedings of the 27th ACM Symposium on Operating Systems Principles. Huntsville: ACM, 2019: 1–15.
|
|
|
| [9] |
KIM T, KIM H, YU G I, et al. BPIPE: memory-balanced pipeline parallelism for training large language models [C]// Proceedings of the 40th International Conference on Machine Learning. Honolulu: PMLR, 2023: 16639–16653.
|
|
|
| [10] |
ALISTARH D, GRUBIC D, LI J, et al. QSGD: communication-efficient SGD via gradient quantization and encoding [C]// Proceedings of the 31th Conference on Neural Information Processing Systems. Long Beach: [s.n.], 2017: 1–12.
|
|
|
| [11] |
GUO J, WU J, WANG Z, et al. Compressing large language models by joint sparsification and quantization [C]// Proceedings of the International Conference on Machine Learning. Vienna: PMLR, 2024: 1–13.
|
|
|
| [12] |
RENGGLI C, ASHKBOOS S, AGHAGOLZADEH M, et al. SparCML: high-performance sparse communication for machine learning [C]// Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis. Denver: ACM, 2019: 1–15.
|
|
|
| [13] |
陈世达, 刘强, 韩亮 降低分布式训练通信的梯度稀疏压缩方法[J]. 浙江大学学报: 工学版, 2021, 55 (2): 386- 394 CHEN Shida, LIU Qiang, HAN Liang Gradient sparsification compression approach to reducing communication in distributed training[J]. Journal of Zhejiang University: Engineering Science, 2021, 55 (2): 386- 394
doi: 10.3785/j.issn.1008-973X.2021.02.019
|
|
|
| [14] |
CHEN T, XU B, ZHANG C, et al. Training deep nets with sublinear memory cost [EB/OL]. (2016−04−22)[2025−12−09]. https://arxiv.org/pdf/1604.06174.
|
|
|
| [15] |
BEAUMONT O, EYRAUD-DUBOIS L, SHILOVA A. Efficient combination of rematerialization and offloading for training DNNs [C]// Proceeding of the 35th International Conference on Neural Information Processing Systems. [S.l.]: Curran Associates Inc., 2021, 34: 23844–23857.
|
|
|
| [16] |
SHOEYBI M, PATWARY M, PURI R, et al. Megatron-LM: training multi-billion parameter language models using model parallelism [EB/OL]. (2020−03−13)[2025−12−09]. https://arxiv.org/pdf/1909.08053.
|
|
|
| [17] |
RASLEY J, RAJBHANDARI S, RUWASE O, et al. DeepSpeed: system optimizations enable training deep learning models with over 100 billion parameters [C]// Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. [S.l.]: ACM, 2020: 3505–3506.
|
|
|
| [18] |
LANGER M, HE Z, RAHAYU W, et al Distributed training of deep learning models: a taxonomic perspective[J]. IEEE Transactions on Parallel and Distributed Systems, 2020, 31 (12): 2802- 2818
doi: 10.1109/TPDS.2020.3003307
|
|
|
| [19] |
GUAN L, LI D S, LIANG J Y, et al Advances of pipeline model parallelism for deep learning training: an overview[J]. Journal of Computer Science and Technology, 2024, 39 (3): 567- 584
doi: 10.1007/s11390-024-3872-3
|
|
|
| [20] |
张贵鹏, 孙毓忠 大模型训练的混合并行技术综述[J]. 计算机学报, 2026, 49 (1): 109- 131 ZHANG Guipeng, SUN Yuzhong A survey on hybrid parallelism techniques for large model training[J]. Chinese Journal of Computers, 2026, 49 (1): 109- 131
doi: 10.11897/SP.J.1016.2026.00109
|
|
|
| [21] |
YANG B, ZHANG J, LI J, et al. PipeMare: asynchronous pipeline parallel DNN training [C]// Proceedings of the 4th Machine Learning and Systems Conference. San Jose: PMLR, 2021, 3: 269–296.
|
|
|
| [22] |
NARAYANAN D, PHANISHAYEE A, SHI K, et al. Memory-efficient pipeline-parallel DNN training [C]// Proceedings of the 38th International Conference on Machine Learning. [S.l.]: PMLR, 2021: 7937–7947.
|
|
|
| [23] |
AJANTHAN T, RAMASINGHE S, ZUO Y, et al. Nesterov method for asynchronous pipeline parallel optimization [C]// Proceedings of the 42nd International Conference on Machine Learning. Vancouver: PMLR, 2025: 909–924.
|
|
|
| [24] |
FAN S, RONG Y, MENG C, et al. DAPPLE: a pipelined data parallel approach for training large models [C]// Proceedings of the 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. [S.l.]: ACM, 2021: 431–445.
|
|
|
| [25] |
LAMY-POIRIER J. Breadth-first pipeline parallelism [C]// Proceedings of the 6th Machine Learning and Systems Conference. Miami: PMLR, 2023, 5: 48–67.
|
|
|
| [26] |
LIU Z, CHENG S, ZHOU H, et al. Hanayo: harnessing wave-like pipeline parallelism for enhanced large model training efficiency [C]// Proceedings of the SC23: International Conference for High Performance Computing, Networking, Storage and Analysis. Denver: IEEE, 2024: 1–13.
|
|
|
| [27] |
QI P, WAN X, HUANG G, et al. Zero bubble (almost) pipeline parallelism [C]// Proceedings of the International Conference on Learning Representations. Vienna: ICLR, 2024: 1–16.
|
|
|
| [28] |
JAIN A, AHMAD AWAN A, ALJUHANI A M, et al. GEMS: GPU-enabled memory-aware model-parallelism system for distributed DNN training [C]// Proceedings of the SC20: International Conference for High Performance Computing, Networking, Storage and Analysis. Atlanta: IEEE, 2021: 1–15.
|
|
|
| [29] |
LI S, HOEFLER T. Chimera: efficiently training large-scale neural networks with bidirectional pipelines [C]// Proceedings of the SC21: International Conference for High Performance Computing, Networking, Storage and Analysis. St. Louis: IEEE, 2022: 1–14.
|
|
|
| [30] |
ZHANG W, ZHOU B, TANG X, et al. MixPipe: efficient bidirectional pipeline parallelism for training large-scale models [C]// Proceedings of the 60th ACM/IEEE Design Automation Conference. San Francisco: IEEE, 2023: 1–6.
|
|
|
| [31] |
LIN J, LIU Z, YOU Y, et al. WeiPipe: weight pipeline parallelism for communication-effective long-context large model training [C]// Proceedings of the 30th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming. Las Vegas: ACM, 2025: 225–238.
|
|
|
| [32] |
WU H, CHEN L. TawPipe: topology-aware weight pipeline parallelism for accelerating long-context large models training [C]// Proceedings of the AAAI Conference on Artificial Intelligence. Singapore: AAAI, 2026, 40(32): 26894–26902.
|
|
|
| [33] |
赵海燕, 易庆奥, 汤敬华, 等 分布式模型训练中的通信优化方法: 现状及展望[J]. 小型微型计算机系统, 2024, 45 (12): 2964- 2978 ZHAO Haiyan, YI Qing’ao, TANG Jinghua, et al Communication optimization in distributed model training: current research and prospects[J]. Journal of Chinese Computer Systems, 2024, 45 (12): 2964- 2978
doi: 10.20009/j.cnki.21-1106/TP.2024-0123
|
|
|
| [34] |
LIU W, LU K, LAI Z, et al AutoPipe-H: a heterogeneity-aware data-paralleled pipeline approach on commodity GPU servers[J]. IEEE Transactions on Computers, 2025, 74 (4): 1196- 1209
doi: 10.1109/TC.2024.3517748
|
|
|
| [35] |
VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need [C]// 31st Conference on Neural Information Processing Systems. Long Beach: Curran Associates Inc., 2017: 1–11.
|
|
|
| [36] |
DEVLIN J, CHANG M W, LEE K, et al. BERT: pre-training of deep bidirectional transformers for language understanding [C]// Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). Minneapolis: ACL, 2019: 4171–4186.
|
|
|
| [37] |
BROWN T B, MANN B, RYDER N, et al. Language models are few-shot learners [C]// Proceedings of the 34th International Conference on Neural Information Processing Systems. [S.l.]: Curran Associates Inc., 2020, 33: 1877–1901.
|
|
|
| [38] |
PETERSON J, MEYLAN S, BOURGIN D. Open clone of OpenAI’s unreleased webtext dataset scraper [EB/OL]. (2020−08−15)[2025−12−09]. https://github.com/jcpeterson/openwebtext.
|
|
|
| [39] |
SUN Z, CAO H, WANG Y, et al. AdaPipe: optimizing pipeline parallelism with adaptive recomputation and partitioning [C]// Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3. La Jolla: ACM, 2024: 86–100.
|
|
|
|
Viewed |
|
|
|
Full text
|
|
|
|
|
Abstract
|
|
|
|
|
Cited |
|
|
|
|
| |
Shared |
|
|
|
|
| |
Discussed |
|
|
|
|