{"id":"arxiv:2305.13245","kind":"preprint","title":"GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints","authors":["Joshua Ainslie","James Lee-Thorp","Michiel de Jong","Yury Zemlyanskiy","Federico Lebrón","Sumit Sanghai"],"author_count":6,"year":2023,"published":"2023-05-22","venue":null,"cited_by":null,"doi":null,"arxiv_id":"2305.13245","nct_id":null,"source_url":"https://arxiv.org/abs/2305.13245","archive_url":"https://space-kitty.com/papers/arxiv:2305.13245","updated":"2023-12-23","pmid":null,"pmcid":null,"openalex_id":null,"pdf_url":"https://arxiv.org/pdf/2305.13245","abstract":"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.","abstract_license":"CC0-1.0 (arXiv descriptive metadata)","license":null,"is_open_access":false,"retracted":false,"peer_reviewed":false,"categories":["cs.CL","cs.LG"],"details":null,"provenance":"arxiv","attribution":"Abstract: arXiv descriptive metadata (CC0). Thank you to arXiv for use of its open access interoperability. This service was not reviewed or approved by, nor does it necessarily express or reflect the policies or opinions of, arXiv.","topics":[{"slug":"llm-architectures","name":"LLM Architectures & Pretraining","domain_slug":"ai"}],"cited_in_dossiers":[{"slug":"llm-architectures","title":"LLM Architectures & Pretraining: State of the Field (October 2026)","url":"https://space-kitty.com/dossiers/llm-architectures"}]}