PipeOptim: Ensuring Effective 1F1B Schedule with Optimizer-Dependent Weight Prediction
College of Computer Science and Technology, Taiyuan University of Technology(太原理工大学计算机科学与技术学院);School of Computer, National University of Defense Technology(国防科技大学计算机学院);School of Computer and Information Technology, Shanxi University(山西大学计算机与信息技术学院)
Lei Guan, Dongsheng Li, Yongle Chen, Jiye Liang, Wenjian Wang, Xicheng Lu
Asynchronous pipeline model parallelism with a "1F1B" (one forward, one backward) schedule generates little bubble overhead and always provides quite a high throughput. However, the "1F1B" schedule inevitably leads to weight inconsistency and weight staleness issues due to the cross-training of different mini-batches across GPUs. To simultaneously address these two problems, in this paper, we propose an optimizer-dependent weight prediction strategy (a.k.a PipeOptim) for asynchronous pipeline training. The key insight of our proposal is that we employ a weight prediction strategy in the forward pass to ensure that each mini-batch uses consistent and staleness-free weights to compute the forward pass. To be concrete, we first construct the weight prediction scheme based on the update rule of the used optimizer when training the deep neural network models. Then throughout the "1F1B" pipelined training, each mini-batch is mandated to execute weight prediction ahead of the forward pass, subsequently employing the predicted weights to perform the forward pass. As a result, PipeOptim 1) inherits the advantage of the "1F1B" schedule and generates pretty high throughput, and 2) can ensure effective parameter learning regardless of the type of the used optimizer. To verify the effectiveness of our proposal, we conducted extensive experimental evaluations using eight different deep-learning models spanning three machine-learning tasks including image classification, sentiment analysis, and machine translation. The experiment results demonstrate that PipeOptim outperforms the popular pipelined approaches including GPipe, PipeDream, PipeDream-2BW, and SpecTrain. The code of PipeOptim can be accessible at https://github.com/guanleics/PipeOptim.
When Is Availability-Aware Training Worth It? A Benchmark and Empirical Study of Interruption-Resilient Optimization Under Predictable Compute Schedules
MoE Key Lab of Artificial Intelligence, AI Institute, School of Computer Science, Shanghai Jiao Tong University(人工智能微电子实验室、人工智能学院、计算机科学学院、上海交通大学);Xiaohongshu Inc.(小红书公司)
IQuest Research(IQuest研究公司);Peking University(北京大学);Sun Yat-sen University(中山大学);Shenzhen University of Advanced Technology(深圳先进技术大学);Shanghai University of Finance and Economics(上海财经大学)
Adaptive Batch Size Schedules for Distributed Training of Language Models with Data and Model Parallelism
Perelman School of Medicine, University of Pennsylvania(宾夕法尼亚大学佩雷尔曼医学院);The University of Chicago Booth School of Business(芝加哥大学布斯商学院);Northwestern University(西北大学);University of Southern California Marshall School of Business(南加州大学马歇尔商学院)