This paper discusses the internal behavior of Transformer language models. Many recent pre-trained models have been reported to exhibit only slight changes in the angular distance between the input and output hidden state vectors in the middle Transformer layers, despite a disproportionately large ``jump'' in the angular distance occurring in or around the final Transformer layer. To characterize this, we first introduce a quantitative metric for the jump strength around the final layer, and then demonstrate its prevalence across many open-weight models, as well as its amplification throughout pre-training. Assuming such jumps indicate an undesirable property, we propose the jump-suppressing regularizer (JREG) which penalizes this jump during pre-training, thereby encouraging more balanced capability usage across the middle layers. Empirical evaluations of three model sizes of Llama-based models, trained with the proposed JREG method, reveal improved task performance compared to the baseline without altering the model architecture.


翻译:本文探讨了Transformer语言模型的内部行为。尽管在中间Transformer层中,输入与输出隐藏状态向量之间的角度距离仅发生轻微变化,但近期许多预训练模型被报道在最终Transformer层或其附近出现不成比例的大幅度角度距离"跳跃"。为量化这一现象,我们首先引入一个衡量最终层附近跳跃强度的指标,随后证明该现象在众多开源权重模型中普遍存在,且其强度在预训练过程中持续增强。假设此类跳跃反映了不良特性,我们提出跳跃抑制正则化器(JREG),通过在预训练过程中惩罚这种跳跃,促使中间层的能力使用更为均衡。基于Llama架构的三种规模模型在使用JREG方法训练后的实证评估表明,在不改变模型架构的前提下,其任务性能相较于基线模型获得提升。

0
下载
关闭预览

相关内容

在搭建网络模型时,需要随机初始化参数,然后开始训练网络,不断调整直到网络的损失越来越小。在训练的过程中,一开始初始化的参数会不断变化。当参数训练到比较好的时候就可以将训练模型的参数保存下来,以便训练好的模型可以在下次执行类似任务时获得较好的结果。
【CMU博士论文】长度可外推的Transformer,149页pdf
专知会员服务
27+阅读 · 2024年6月30日
非Transformer不可?最新《状态空间模型(SSM)》综述
专知会员服务
75+阅读 · 2024年4月16日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
专知会员服务
16+阅读 · 2020年7月27日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员