通过重参数化初始化大语言模型以缓解损失尖峰
Initialization of Large Language Models via Reparameterization to Mitigate Loss Spikes
AI总结:
针对大语言模型预训练中参数范数非均匀引发的损失尖峰问题,提出重参数化权重缩放技术WeSaR,通过门控参数均匀化原始参数范数,在多规模Transformer解码器上实现更稳定高效的训练,效果优于现有初始化方法。
摘要:
损失尖峰(即损失值突然发散的现象)是大语言模型预训练过程中的一个基础性问题。本文认为参数范数的非均匀性是导致损失尖峰的原因之一。在神经网络训练中,为避免梯度消失和梯度爆炸问题,需要保持各层梯度尺度恒定。然而,要在Transformer模型中满足这些要求,模型参数的范数必须是非均匀的,因此范数更小的参数对参数更新更敏感。为解决这一问题,我们提出了一种新技术:作为重参数化的权重缩放(WeSaR)。WeSaR为每个参数矩阵引入一个门控参数,并将其调整到满足要求的值。得益于门控参数,WeSaR将原始参数的范数设置为均匀的,从而实现稳定训练。在包含1.3亿、13亿和130亿参数的Transformer解码器上的实验结果表明,WeSaR能够稳定并加速训练,且性能优于包括主流初始化方法在内的对比方法。
英文摘要:
Loss spikes, a phenomenon in which the loss value diverges suddenly, is a fundamental issue in the pre-training of large language models. This paper supposes that the non-uniformity of the norm of the parameters is one of the causes of loss spikes. Here, in training of neural networks, the scale of the gradients is required to be kept constant throughout the layers to avoid the vanishing and exploding gradients problem. However, to meet these requirements in the Transformer model, the norm of the model parameters must be non-uniform, and thus, parameters whose norm is smaller are more sensitive to the parameter update. To address this issue, we propose a novel technique, weight scaling as reparameterization (WeSaR). WeSaR introduces a gate parameter per parameter matrix and adjusts it to the value satisfying the requirements. Because of the gate parameter, WeSaR sets the norm of the original parameters uniformly, which results in stable training. Experimental results with the Transformer decoders consisting of 130 million, 1.3 billion, and 13 billion parameters showed that WeSaR stabilizes and accelerates training and that it outperformed compared methods including popular initialization methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。