arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.01685cs.LGcs.AIcs.CVmath.OC
收藏

MKOR: 基于秩1更新的启用动量的克罗内克因子优化器

MKOR: Momentum-Enabled Kronecker-Factor-Based Optimizer Using Rank-1 Updates

University of Toronto(多伦多大学);Texas Advanced Computing Server(德克萨斯高级计算中心);Rutgers University(罗格斯大学)

Mohammad Mozaffari, Sikan Li, Zhao Zhang, Maryam Mehri Dehnavi

AI总结:

本研究提出基于秩1更新的动量克罗内克因子二阶优化器MKOR及其混合版本,降低计算与通信复杂度、提升更新频率,在BERT-Large-Uncased训练中显著优于主流一、二阶优化器。

摘要:

本研究提出了一种基于秩1更新的启用动量的克罗内克因子优化器,名为MKOR,用于提升深度神经网络(DNN)的训练速度与收敛性能。二阶方法虽比一阶方法收敛速度更快,但复杂度随模型规模和/或训练批次规模呈三次方增长,因此在Transformer模型(如大语言模型LLM)中可扩展性与表现不佳——这类模型的批次规模会随注意力机制的序列长度扩大,导致模型与批次规模均较大。MKOR的复杂度随模型规模呈二次方增长,缓解了二阶方法的计算瓶颈。\n由于计算复杂度高,现有最优二阶方法实现只能低频更新二阶信息,无法充分发挥这类更新带来的收敛优势。MKOR通过降低二阶更新的通信复杂度并实现线性通信复杂度,提升了二阶更新的频率。我们还提出了MKOR的混合版本MKOR-H,若训练中期二阶更新不再加速收敛,便回退至一阶优化器。\n实验结果显示,在64块GPU上训练BERT-Large-Uncased时,MKOR的性能优于现有最优一阶方法(如LAMB优化器)达2.57倍,优于最优二阶方法实现(即KAISA/KFAC)达1.85倍。

英文摘要:

This work proposes a Momentum-Enabled Kronecker-Factor-Based Optimizer Using Rank-1 updates, called MKOR, that improves the training time and convergence properties of deep neural networks (DNNs). Second-order techniques, while enjoying higher convergence rates vs first-order counterparts, have cubic complexity with respect to either the model size and/or the training batch size. Hence they exhibit poor scalability and performance in transformer models, e.g. large language models (LLMs), because the batch sizes in these models scale by the attention mechanism sequence length, leading to large model size and batch sizes. MKOR's complexity is quadratic with respect to the model size, alleviating the computation bottlenecks in second-order methods. Because of their high computation complexity, state-of-the-art implementations of second-order methods can only afford to update the second order information infrequently, and thus do not fully exploit the promise of better convergence from these updates. By reducing the communication complexity of the second-order updates as well as achieving a linear communication complexity, MKOR increases the frequency of second order updates. We also propose a hybrid version of MKOR (called MKOR-H) that mid-training falls backs to a first order optimizer if the second order updates no longer accelerate convergence. Our experiments show that MKOR outperforms state -of-the-art first order methods, e.g. the LAMB optimizer, and best implementations of second-order methods, i.e. KAISA/KFAC, up to 2.57x and 1.85x respectively on BERT-Large-Uncased on 64 GPUs.

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

↑