mlsanityData to 7 Oct 2026

QCQA: Quality and Capacity-aware grouped Query Attention

arXiv 2406.10247 ↗First posted 8 Jun 2024cs.CL cs.AIcited by 5

On the map: Efficient LLM inference and serving → KV cache optimization

Abstract (arXiv)

Excessive memory requirements of key and value features (KV-cache) present significant challenges in the autoregressive inference of large language models (LLMs), restricting both the speed and length of text generation. Approaches such as Multi-Query Attention (MQA) and Grouped Query Attention (GQA) mitigate these challenges by grouping query heads and consequently reducing the number of corresponding key and value heads. However, MQA and GQA decrease the KV-cache size requirements at the expense of LLM accuracy (quality of text generation). These methods do not ensure an optimal tradeoff between KV-cache size and text generation quality due to the absence of quality-aware grouping of query heads. To address this issue, we propose Quality and Capacity-Aware Grouped Query Attention (QCQA), which identifies optimal query head groupings using an evolutionary algorithm with a computationally efficient and inexpensive fitness function. We demonstrate that QCQA achieves a significantly better tradeoff between KV-cache capacity and LLM accuracy compared to GQA. For the Llama2 7,B model, QCQA achieves 20% higher accuracy than GQA with similar KV-cache size requirements in the absence of fine-tuning. After fine-tuning both QCQA and GQA, for a similar KV-cache size, QCQA provides 10.55,% higher accuracy than GQA. Furthermore, QCQA requires 40,% less KV-cache size than GQA to attain similar accuracy. The proposed quality and capacity-aware grouping of query heads can serve as a new paradigm for KV-cache optimization in autoregressive LLM inference.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 18 of its 34 references that are in the map. First posted on arXiv 8 Jun 2024.

Builds on

18 of 34 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May

Other references · 17

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  3. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  4. 2016Pointer Sentinel Mixture Modelscited by 2,992
  5. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
  6. 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 778
  7. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 700
  8. 2020pymoo: Multi-objective Optimization in Pythoncited by 196
  9. 2020A Survey on Evolutionary Neural Architecture Searchcited by 142
  10. 2020HAT: Hardware-Aware Transformers for Efficient Natural Language Processingcited by 136
  11. 2024Dynamic Memory Compression: Retrofitting LLMs for Accelerated Inferencecited by 115
  12. 2023SkipDecode: Autoregressive Skip Decoding with Batching and Caching for Efficient LLM Inferencecited by 89
5 more
  1. 2024KV Cache is 1 Bit Per Channel: Efficient Large Language Model Inference with Coupled Quantizationcited by 74
  2. 2023Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformerscited by 67
  3. 2020Neural Architecture Transfercited by 59
  4. 2023GQKVA: Efficient Pre-training of Transformers by Grouping Queries, Keys, and Valuescited by 9
  5. 2022A Hardware-Aware Framework for Accelerating Neural Architecture Search Across Modalitiescited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 2; 2026: 1.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Align Attention Heads Before Merging Them: An Effective Way for Converting MHA to GQA
  2. 2024Effectively Compress KV Heads for LLM
  3. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference
  4. 2024Reducing Transformer Key-Value Cache Size with Cross-Layer Attention
  5. 2024CORM: Cache Optimization with Recent Message for Large Language Model Inference
  6. 2024ThinK: Thinner Key Cache by Query-Driven Pruning
  7. 2025CompressKV: Semantic Retrieval Heads Know What Tokens are Not Important Before Generation
  8. 2025KV Cache Compression for Inference Efficiency in LLMs: A Review