KV Shifting Attention Enhances Language Modeling

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Xu, Mingyu, Cheng, Wei, Wang, Bingning, Chen, Weipeng
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910727973896192
author Xu, Mingyu
Cheng, Wei
Wang, Bingning
Chen, Weipeng
author_facet Xu, Mingyu
Cheng, Wei
Wang, Bingning
Chen, Weipeng
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2411_19574
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle KV Shifting Attention Enhances Language Modeling
Xu, Mingyu
Cheng, Wei
Wang, Bingning
Chen, Weipeng
Computation and Language
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.
title KV Shifting Attention Enhances Language Modeling
topic Computation and Language
url https://arxiv.org/abs/2411.19574