Overview
Clear theory + targeted ablations and numbers on LLaMA-2 (7B/13B) show consistent gains, but experiments are limited to a few zero-shot tasks and one model family.
Citations3
Evidence Strength0.70
Confidence0.78
Risk Signals10
Trust Signals
Findings with numeric evidence: 5/5
Findings with evidence refs: 5/5
Results with explicit delta: 4/5
Reproducibility
Status: Partial assets available
Open source: Partial
At A Glance
Cost impact: 80%
Production readiness: 70%
Novelty: 45%
Why It Matters For Business
QAQ can cut the GPU memory used by KV caches by ~8–10×, enabling longer-context features or reducing GPU requirements and cost with little accuracy loss.
Who Should Care
Summary TLDR
QAQ is a post-training quantization method for the Key-Value (KV) cache used during LLM autoregressive inference. It (1) assigns different quantization strategies to keys and values, (2) keeps rare outlier entries in full precision, and (3) uses an attention-window heuristic to avoid irreversible mistakes. On LLaMA-2 (7B/13B) and three zero-shot tasks, QAQ compresses the KV cache near 8–10× with negligible accuracy loss and ~1.6–1.8× better lossless compression than prior cache-only methods. Code is available.
Problem Statement
The KV cache (stored keys and values from past tokens) grows linearly with context length and quickly dominates GPU memory for long-context LLM inference. Prior eviction heuristics can remove needed tokens. The problem: shrink KV cache memory via quantization while keeping attention outputs (and thus generation quality) intact.
Main Contribution
QAQ: a post-training, per-token quantization formula that assigns bits separately for key and value caches based on predicted impact on attention outputs.
Mixed-precision outlier handling: keep the top/ bottom α% of KV entries at full precision and quantize the rest, reducing quantization error.
Key Findings
Key vectors are more sensitive to quantization than value vectors; uniform 2-bit quantization harms keys far more than values.
QAQ compresses the KV cache up to about 10× with minimal accuracy loss on evaluated tasks.
Results
| Metric | Value | Baseline | Delta | Split / Dataset | Evidence | Evidence Ref |
|---|---|---|---|---|---|---|
| Accuracy | LLaMA-2-7B: HellaSwag 7.48×, PIQA 7.48×, MathQA 6.04× | uncompressed (1×) | ≈7–8× reduction | zero-shot evaluations | Table 1; Sec 5.2 | Table 1 |
| Accuracy | LLaMA-2-13B: HellaSwag 8.39×, PIQA 9.02×, MathQA 6.06× | uncompressed (1×) | ≈6–9× reduction | zero-shot evaluations | Table 1; Sec 5.2 | Table 1 |
What To Try In 7 Days
Run the authors' repo on a LLaMA-2-7B model and reproduce memory vs accuracy plots on one dataset.
Try α=1% outliers and attention window n=5; measure memory, latency, and accuracy trade-offs.
Integrate QAQ into your inference pipeline where KV cache size limits context length and measure real-world speed/transfer costs.
Optimization Features
Token Efficiency
System Optimization
Inference Optimization
Reproducibility
Risks & Boundaries
Limitations
Relies on the persistence-of-importance assumption; abrupt attention changes still need re-quantization.
Evaluation limited to LLaMA-2 (7B/13B) and three zero-shot tasks; generality to other models/tasks untested.
When Not To Use
On ultra-low-latency systems where CPU–GPU transfers are prohibitively expensive.
When the model uses multi-query attention variants that already reduce KV cache size significantly.
Failure Modes
Underestimating future attention for a token leads to irreversible quantization and degraded output.
Misclassifying outliers (too many or too few) either wastes memory or causes accuracy drops.

