GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints
GQA: обучение обобщённых трансформерных моделей с grouped-query attention на основе чекпоинтов с многоголовым вниманием
2023-01-01
SCID: 54.1/69fx4hae
Discuss with AI
decoder inference speedupgrouped-query attentionmulti-query attentionpre-training compute savingsuptraining from multi-head checkpoints
Figures from the paper
Abstract (AI)
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.
Key Findings
1
A recipe is proposed to uptrain existing multi-head language model checkpoints into models with multi-query attention (MQA) using only 5% of the original pre-training compute.
2
Grouped-query attention (GQA) is introduced as a generalization of MQA that uses an intermediate number of key-value heads (more than one, fewer than the number of query heads).
3
The uptraining approach enables converting models to faster inference formats (MQA/GQA) without training separate models from scratch.
4
Uptrained GQA models achieve quality close to multi-head attention while having inference speed comparable to MQA.
Research Object
Transformer decoder language models (multi-head, multi-query, and grouped-query attention variants) derived from multi-head checkpoints
Research Subject
Methods for uptraining multi-head checkpoints into multi-query and grouped-query attention models using minimal additional pretraining compute, and evaluation of resulting trade-offs between inference speed and quality compared to multi-head attention
Publication Details
Publication Date
2023-01-01
Journal
Publisher
ISSN
Cited by
388
Open access PDF
Access Type
Author Information
Download PDF
Subscribe to digest