不再出现损失尖峰:稳定大语言模型的预训练
Spike No More: Stabilizing the Pre-training of Large Language Models
AI总结:
本文针对大语言模型预训练中的损失尖峰问题,通过子层 Jacobian 谱范数分析提出“小子层、大捷径连接”条件,并实验验证其能稳定梯度范数、防止尖峰。
摘要:
损失尖峰经常发生在大语言模型的预训练过程中。这些尖峰会降低大语言模型的性能,有时还会毁掉预训练。由于预训练需要巨大的计算预算,我们应当避免此类尖峰。基于损失尖峰由梯度范数突然增大所导致这一假设,我们通过分析各子层 Jacobian 矩阵的谱范数,探索了使梯度范数保持较小的因素。我们的发现表明,稳定预训练过程需要两个条件:较小的子层和较大的捷径连接。我们开展了多项实验,以经验方式验证理论分析。实验结果表明,满足这些条件的方法可有效防止预训练期间的损失尖峰。
英文摘要:
Loss spikes often occur during pre-training of large language models. The spikes degrade the performance of large language models and sometimes ruin the pre-training. Since the pre-training needs a vast computational budget, we should avoid such spikes. Based on the assumption that the loss spike is caused by the sudden growth of the gradient norm, we explore factors to keep the gradient norm small through an analysis of the spectral norms of the Jacobian matrices for the sub-layers. Our findings suggest that stabilizing the pre-training process requires two conditions: small sub-layers and large shortcut. We conduct various experiments to empirically verify our theoretical analyses. Experimental results demonstrate that methods satisfying the conditions effectively prevent loss spikes during pre-training.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。