KV 이동 주의가 언어 모델링을 향상시킵니다.
KV Shifting Attention Enhances Language Modeling
November 29, 2024
저자: Mingyu Xu, Wei Cheng, Bingning Wang, Weipeng Chen
cs.AI
초록
현재의 대형 언어 모델은 주로 디코딩 전용 구조 트랜스포머에 기반하며, 이는 컨텍스트 학습 능력이 뛰어납니다. 이 모델의 컨텍스트 학습 능력의 중요한 기반이 인덕션 헤드 메커니즘으로 여겨지며, 적어도 두 개의 레이어 어텐션을 필요로 합니다. 모델의 인덕션 능력을 더 효율적으로 구현하기 위해 인덕션 헤드 메커니즘을 재방문하고 KV 쉬프팅 어텐션을 제안했습니다. 우리는 이론적으로 KV 쉬프팅 어텐션이 모델의 인덕션 헤드 메커니즘의 깊이와 너비에 대한 요구 사항을 줄인다는 것을 증명했습니다. 실험 결과는 KV 쉬프팅 어텐션이 인덕션 헤드 및 언어 모델링 학습에 유익하며, 장난감 모델부터 10 B 이상의 파라미터를 갖는 사전 훈련 모델로의 더 나은 성능 또는 빠른 수렴을 이끌어 냅니다.
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.Summary
AI-Generated Summary