Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints

About

Multi-query attention (MQA), which only uses a single key-value head, drastically speeds up decoder inference. However, MQA can lead to quality degradation, and moreover it may not be desirable to train a separate model just for faster inference. We (1) propose a recipe for uptraining existing multi-head language model checkpoints into models with MQA using 5% of original pre-training compute, and (2) introduce grouped-query attention (GQA), a generalization of multi-query attention which uses an intermediate (more than one, less than number of query heads) number of key-value heads. We show that uptrained GQA achieves quality close to multi-head attention with comparable speed to MQA.

Joshua Ainslie, James Lee-Thorp, Michiel de Jong, Yury Zemlyanskiy, Federico Lebr\'on, Sumit Sanghai• 2023

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningHellaSwag
Accuracy39.4
1460
Question AnsweringARC Challenge--
749
Commonsense ReasoningPIQA
Accuracy67.5
647
Question AnsweringARC Easy
Accuracy42.2
386
Question AnsweringSciQ--
226
Language ModelingLAMBADA
Accuracy37.4
183
Reading ComprehensionRACE
Accuracy29
151
Multi-task Language UnderstandingMMLU
Accuracy24.1
101
Language ModelingWikiText (val)
Perplexity31.74
34
Multi-task Language UnderstandingLM Evaluation Harness (test)
ARC Challenge Acc44.28
24
Showing 10 of 13 rows

Other info

Follow for update