ChatPaper.aiChatPaper

KV Verschuivende Aandacht Verbeteren Taalmodellering

KV Shifting Attention Enhances Language Modeling

November 29, 2024
Auteurs: Mingyu Xu, Wei Cheng, Bingning Wang, Weipeng Chen
cs.AI

Samenvatting

De huidige grote taalmodellen zijn voornamelijk gebaseerd op decoderende structuurtransformatoren, die geweldige mogelijkheden hebben voor in-context leren (ICL). Over het algemeen wordt aangenomen dat de belangrijke basis van de ICL-capaciteit ervan het inductiekopmechanisme is, dat minstens twee lagen aandacht vereist. Om de inductiecapaciteit van het model efficiënter te implementeren, herzien we het inductiekopmechanisme en stellen een KV-verschuivende aandacht voor. We bewijzen theoretisch dat de KV-verschuivende aandacht de vereisten van het model voor de diepte en breedte van het inductiekopmechanisme vermindert. Onze experimentele resultaten tonen aan dat KV-verschuivende aandacht gunstig is voor het leren van inductiekoppen en taalmodellering, wat leidt tot betere prestaties of snellere convergentie van speelgoedmodellen naar de vooraf getrainde modellen met meer dan 10 B parameters.
English
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.
PDF96December 6, 2024