分析并减少GPT训练中对学习率预热的需求
Analyzing & Reducing the Need for Learning Rate Warmup in GPT Training
AI总结:
本研究针对GPT训练中学习率预热机制作用不明的问题,分析了早期更新过大的原因与衡量指标,提出通过优化器显式归一化更新量来减少甚至消除对预热的需求。
摘要:
学习率预热是训练神经网络时常用的启发式方法,尤其在大批次规模下,尽管人们对其益处的理解仍有限。预热通过在训练初期使用较低的学习率$η_t$来减小更新量$Δ\textbf{w}_t = η_t \textbf{u}_t$。在本研究中,我们认为预热通过限制$Δ\textbf{w}_t$的整体大小来助力训练,抵消了初期$\textbf{u}_t$值过大的问题。我们聚焦于使用AdamW/Lion的小规模GPT训练,探讨以下问题:早期更新$\textbf{u}_t$为何过大,以及依据哪些标准判定其过大?我们分析了衡量更新大小的不同指标,包括$\boldsymbol{\textit{ℓ}}_2$范数、产生的方向变化以及对网络表征的影响,为预热研究提供了新视角。特别地,我们发现预热有助于抵消训练初期的大角度更新以及有限的临界批次规模问题。最后,我们表明,通过修改优化器以基于上述指标显式归一化$\textbf{u}_t$,可显著降低甚至消除对预热的需求。
英文摘要:
Learning Rate Warmup is a popular heuristic for training neural networks, especially at larger batch sizes, despite limited understanding of its benefits. Warmup decreases the update size $Δ\mathbf{w}_t = η_t \mathbf{u}_t$ early in training by using lower values for the learning rate $η_t$. In this work we argue that warmup benefits training by keeping the overall size of $Δ\mathbf{w}_t$ limited, counteracting large initial values of $\mathbf{u}_t$. Focusing on small-scale GPT training with AdamW/Lion, we explore the following question: Why and by which criteria are early updates $\mathbf{u}_t$ too large? We analyze different metrics for the update size including the $\ell_2$-norm, resulting directional change, and impact on the representations of the network, providing a new perspective on warmup. In particular, we find that warmup helps counteract large angular updates as well as a limited critical batch size early in training. Finally, we show that the need for warmup can be significantly reduced or eliminated by modifying the optimizer to explicitly normalize $\mathbf{u}_t$ based on the aforementioned metrics.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。