arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2411.16085cs.LGcs.AIcs.CLcs.CVcs.DM
收藏

谨慎优化器:通过一行代码提升训练

Cautious Optimizers: Improving Training with One Line of Code

The University of Texas at Austin(德克萨斯大学奥斯汀分校)

Kaizhao Liang, Lizhang Chen, Bo Liu, Qiang Liu

AI总结:

通过一行代码改进优化器,提升Transformer预训练和图像分类性能

摘要:

AdamW已成为Transformer预训练的默认优化器。多年来,我们的社区一直在寻找更快、更稳定的优化器,但结果只能是有限的积极成果。在本工作中,我们提出了一种在PyTorch中对任何动量优化器进行的一行修改,我们将其重命名为谨慎优化器,例如C-AdamW和C-Lion。我们的理论结果表明,这种修改保留了Adam的哈密顿函数,并且在Lyapunov分析下不破坏收敛保证。此外,我们的理论洞察揭示了一个全新的优化器家族。其中,我们选取了最简单的那个进行实验证明,在LLM预训练和图像分类中不仅实现了一致的速度提升,而且在超参数上最小的额外调整。代码可在https://github.com/kyleliang919/C-Optim获取。

英文摘要:

AdamW has been the default optimizer for transformer pretraining. For many years, our community searched for faster and more stable optimizers with only constrained positive outcomes. In this work, we propose a \textbf{one-line modification in Pytorch} to any momentum-based optimizer, which we rename cautious optimizer, e.g. C-AdamW and C-Lion. Our theoretical result shows that this modification preserves Adam's Hamiltonian function and it does not break the convergence guarantee under the Lyapunov analysis. In addition, a whole new family of optimizers is revealed by our theoretical insight. Among them, we pick the simplest one for empirical experiments, showing not only consistent speed-up on LLM pretraining, but also image classification, with minimum extra tuning on hyperparameters. Code is available at https://github.com/kyleliang919/C-Optim.

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

↑