KV Shifting Attention Enhances Language Modeling
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.
675269205281c3cae493244d
Mingyu Xu
claimed_verified
2024-12-06T09:09:12.672Z
662f3c239e6d371ab7903b01
/avatars/e36d774f4371a05f27c0950c624f8d3e.svg
xumingyu
user
xumingyu16
675269205281c3cae493244e
Wei Cheng
675269205281c3cae493244f
Bingning Wang
claimed_verified
2024-12-10T15:15:23.438Z
640dd3e0c364a086c6322ad2
https://cdn-avatars.huggingface.co/v1/production/uploads/640dd3e0c364a086c6322ad2/z11CvZcbWGSRtWXzvem6I.png
Daniel Wang
user
DanielWang
675269205281c3cae4932450
Weipeng Chen
KV Shifting Attention Enhances Language Modeling
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.
KV shifting attention improves the efficiency of in-context learning in large language models by reducing the depth and width requirements of induction heads.
decode-only structure transformers in-context learning induction heads mechanism KV shifting attention language modeling