What is AWQ (activation-aware weight quantisation)?
AWQ is a post-training quantisation method that lowers language model weights to low precision such as 4 bits while protecting the weight channels that matter for activations, setting scales from a small calibration set.
It differs from GPTQ in how it handles error: GPTQ compensates by updating remaining weights layer by layer, while AWQ protects salient channels by scaling them; neither uses backpropagation. Despite its name, it quantises only weights, not activations.
- Topic
- Machine learning, models and training
- Also known as
- Activation-aware weight quantization
- Origin
- 2023, Lin et al.
How AWQ (activation-aware weight quantisation) works
- A small calibration set is run through the model and activation magnitudes are measured for each weight channel.
- Salient channels are found by looking at those multiplied by large activations, not at weight size.
- Per-channel scale factors are searched to minimise output error on the calibration data; no retraining is needed.
- Weights are stored at 4 bits with group scales while activations stay at 16 bits (weight-only quantisation).
In more detail
The inverse scaling mechanism
To protect salient channels without hardware-unfriendly mixed-precision layouts, AWQ multiplies those weight channels by a scaling factor greater than 1 and divides the corresponding input activations by the same factor before quantisation. Because the division and multiplication cancel out, the layer output is mathematically unchanged while the relative quantisation error on important channels drops significantly.
Memory-bound versus compute-bound regimes and FP8
AWQ accelerates memory-bandwidth-bound decoding at low to moderate batch sizes because fewer bytes are read from GPU HBM per token. However, at large batch sizes or during long-prompt prefill, where computation becomes compute-bound, dequantising INT4 weights back to FP16 on the fly can make W4A16 slower than native FP8 (W8A8) on Hopper or Blackwell GPUs.
Kernel support and the KV cache limit
Effective quantisation relies on specialised fused GPU kernels such as Marlin or AWQ GEMM and GEMV kernels, which dequantise packed 4-bit integers directly in registers during matrix multiplication. Furthermore, AWQ compresses model weights only and does not reduce the KV cache, which can still dominate VRAM at long context lengths.
Commonly confused terms
| Term | How it differs |
|---|---|
| SmoothQuant | SmoothQuant performs W8A8 (weight and activation) quantisation by mathematically migrating quantisation difficulty from outlier activations into weights so INT8 matrix multiplications run natively. AWQ is weight-only (typically W4A16) and keeps activations in FP16 or BF16. |
| GGUF | GGUF is a model file or container format (used by llama.cpp) supporting diverse CPU and GPU quantisation schemes such as K-quants, whereas AWQ is a specific activation-aware quantisation algorithm whose outputs are commonly stored in safetensors with INT4 packed weights for GPU engines like vLLM and TensorRT-LLM. |
Why AWQ (activation-aware weight quantisation) matters for on-premises AI
Because only a small calibration set is needed, quantisation can be done in-house with the organisation's own texts; data stays inside. Moving from 16 to 4 bits cuts weight memory to a quarter, plus about 0.25 bits per weight for group scales. Common local inference engines support the AWQ format directly, so models go to production without extra conversion. Results vary with the model, task and how representative the calibration data is; they are measured on the organisation's own evaluation set.
A telecoms operator quantises the weights of its in-house support question model with AWQ and compares results with the original on the same question set.
Common questions
How do you choose between AWQ and GPTQ for in-house inference?
Compare the target GPU, the kernels your inference engine supports and task results on your own validation set. Trying both on the same model and measuring is the most reliable route.
Does AWQ quantise activations too?
No. AWQ quantises weights only; it uses the activation distribution solely to decide which weight channels to protect.
Related terms
- Post-training quantisation
- Weight-only quantisation
- Calibration dataset
- GPTQ
- Quantisation
- Quantisation error
- SmoothQuant
- 4-bit integer
Sources
- Lin et al., AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration, 2023
- Frantar et al., GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers, 2022
- Xiao et al., SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models, 2022
In the glossary: Glossary, A to C