arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2312.00839cs.LGcs.AI
收藏

PipeOptim:通过优化器依赖的权重预测确保高效1F1B调度

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

AI总结:

针对异步流水线训练中1F1B调度的权重不一致与陈旧问题,提出优化器依赖的权重预测策略PipeOptim,通过前向传播前预测权重保证参数一致性,实验证明其在吞吐量和学习效果上优于多款主流方法。

摘要:

采用“1F1B”(一次前向、一次反向)调度的异步流水线模型并行产生的气泡开销极小,且始终提供相当高的吞吐量。然而,由于不同GPU间不同小批量的交叉训练,“1F1B”调度不可避免地导致权重不一致和权重陈旧问题。为同时解决这两个问题,本文提出一种用于异步流水线训练的优化器依赖权重预测策略(即PipeOptim)。我们方案的核心见解是在前向传播中采用权重预测策略,确保每个小批量使用一致且无陈旧的权重来计算前向传播。具体而言,我们首先基于训练深度神经网络模型时所用优化器的更新规则构建权重预测方案。然后在整个“1F1B”流水线训练过程中,每个小批量被要求在前向传播前执行权重预测,随后使用预测的权重执行前向传播。因此,PipeOptim 1)继承了“1F1B”调度的优势,产生极高的吞吐量;2)无论所用优化器类型如何,都能确保有效的参数学习。为验证我们方案的有效性,我们使用涵盖图像分类、情感分析和机器翻译三个机器学习任务的八个不同深度学习模型进行了广泛的实验评估。实验结果表明,PipeOptim优于GPipe、PipeDream、PipeDream-2BW和SpecTrain等流行的流水线方法。PipeOptim的代码可在https://github.com/guanleics/PipeOptim获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑