大规模Transformer训练不稳定性的小规模代理
Small-scale proxies for large-scale Transformer training instabilities
AI总结:
本研究通过小规模模型重现大规模Transformer训练不稳定性,验证高学习率下的失稳现象及缓解措施,并探索优化器与模型干预对学习率敏感性的影响,实现跨学习率范围的稳定训练。
摘要:
训练大型基于Transformer模型的团队已报告,在相同超参数下,小规模训练未出现的不稳定性在大规模训练中出现。尽管此类不稳定性的原因具有科学意义,但重现它们所需的资源量使得研究变得困难。在这项工作中,我们寻求在小规模下重现和研究训练稳定性与不稳定性的方法。首先,我们关注先前工作中描述的两种训练不稳定性来源:注意力层中logits的增长(Dehghani等人,2023)以及输出logits与对数概率的偏离(Chowdhery等人,2022)。通过测量学习率与损失在不同规模下的关系,我们表明这些不稳定性在高学习率下训练的小模型中也出现,并且先前在大规模下采用的缓解措施在此情境下同样有效。这促使我们研究其他已知的优化器和模型干预措施在多大程度上影响最终损失对学习率变化的敏感性。为此,我们研究了诸如预热、权重衰减和$\mu$Param(Yang等人,2022)等方法,并组合技术来训练小模型,使其在学习率变化多个数量级时实现相似的损失。最后,为结束我们的探索,我们研究了两个案例,在这些案例中,可以通过检查模型激活和梯度范数的缩放行为来预测不稳定性的出现。
英文摘要:
Teams that have trained large Transformer-based models have reported training instabilities at large scale that did not appear when training with the same hyperparameters at smaller scales. Although the causes of such instabilities are of scientific interest, the amount of resources required to reproduce them has made investigation difficult. In this work, we seek ways to reproduce and study training stability and instability at smaller scales. First, we focus on two sources of training instability described in previous work: the growth of logits in attention layers (Dehghani et al., 2023) and divergence of the output logits from the log probabilities (Chowdhery et al., 2022). By measuring the relationship between learning rate and loss across scales, we show that these instabilities also appear in small models when training at high learning rates, and that mitigations previously employed at large scales are equally effective in this regime. This prompts us to investigate the extent to which other known optimizer and model interventions influence the sensitivity of the final loss to changes in the learning rate. To this end, we study methods such as warm-up, weight decay, and the $μ$Param (Yang et al., 2022), and combine techniques to train small models that achieve similar losses across orders of magnitude of learning rate variation. Finally, to conclude our exploration we study two cases where instabilities can be predicted before they emerge by examining the scaling behavior of model activation and gradient norms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。