arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.19574cs.CL
收藏

KV Shifting Attention增强语言建模

KV Shifting Attention Enhances Language Modeling

Baichuan Inc(百川公司)

Mingyu Xu, Wei Cheng, Bingning Wang, Weipeng Chen

AI总结:

本文提出KV shifting attention,通过改进注意力机制降低实现induction heads所需的深度与宽度,并在玩具模型到10B以上预训练模型中提升语言建模性能或收敛速度。

摘要:

当前的大语言模型主要基于decode-only结构的transformer,具有强大的上下文学习(in-context learning,ICL)能力。人们普遍认为,其ICL能力的重要基础是induction heads机制,而该机制至少需要两层注意力。为了更高效地实现模型的归纳能力,我们重新审视了induction heads机制,并提出了KV shifting attention。我们从理论上证明,KV shifting attention降低了模型对induction heads机制深度和宽度的要求。实验结果表明,KV shifting attention有助于学习induction heads和语言建模;从toy models到参数量超过10B的预训练模型,它都带来了更好的性能或更快的收敛。

英文摘要:

The current large language models are mainly based on decode-only structure transformers, which have great in-context learning (ICL) capabilities. It is generally believed that the important foundation of its ICL capability is the induction heads mechanism, which requires at least two layers attention. In order to more efficiently implement the ability of the model's induction, we revisit the induction heads mechanism and proposed a KV shifting attention. We theoretically prove that the KV shifting attention reducing the model's requirements for the depth and width of the induction heads mechanism. Our experimental results demonstrate that KV shifting attention is beneficial to learning induction heads and language modeling, which lead to better performance or faster convergence from toy models to the pre-training models with more than 10 B parameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑