What AWQ is
AWQ (activation-aware weight quantization) stores a model's weights in 4 bits and keeps the activations in 16. Its starting point is that weights are not equally important: a weight that multiplies a large input moves the output more when it is rounded. AWQ finds the input channels whose activations are largest, the salient channels, and protects their weights by scaling them up before rounding. It needs only activation statistics from calibration text, no gradients and no reconstruction of the layer's weights.
This page compares Qwen's own AWQ release of Qwen2.5-0.5B-Instruct with the original bf16 model on the GPTQ tab's matrix, layer 12's down_proj (896 × 4,864), recovers the scales the release folded into its weights, and runs AWQ's search here on the same matrix.
Why scaling helps
The release uses asymmetric 4-bit groups of 128 inputs: each group of each output row has an fp16 scale and its own 4-bit zero, so its 16 levels span the group's range from minimum to maximum. A weight on an input contributes to the output, and rounding adds an error of about , with the rounding error in units of one level.
Multiply input channel 's weights by and divide its input by ; the product is the same, . After rounding,
Scaling one column hardly changes its group's range, so and that channel's error shrinks by about : it now uses more of its group's 16 levels. Scaling too far makes the column the group's maximum and coarsens the steps for the other weights, which is why the scale has to be searched.
Scales from activations
AutoAWQ, whose packed format the release uses, sets each channel's scale from , the mean over the calibration text, and , the size of its weights within their groups, then tries on a grid and keeps the one with the smallest output error:
The Scales from activations panel plots the release's scales against those searched here, one dot per input channel; their log-scales correlate at 0.959. The search here, on 32 WikiText-2 sequences, picked ; the release's scales fit with , a smaller found on Qwen's own calibration text. AutoAWQ's clipping of each group's range is left out of the run here.
The scales are not stored. They are folded into the model: down_proj's columns are multiplied by and up_proj's rows divided by it, so up_proj already outputs . The page reads back from up_proj row by row; down_proj's own columns agree to a median of 1.68 %.
Scaled, then rounded
The Scaled, then rounded panel shows the crop with the scale strip above it, the 48 most active of 4,864 channels marked in amber. Hovering a weight spells it out: the code minus the group's zero, times the group's scale, gives the stored scaled weight, and dividing by gives back an approximation of the original. How the file stores it shows the packing, eight outputs of one input per int32 word in an interleaved order, with 4.16 bits per weight in all against GPTQ's 4.19: AWQ has zero points but no g_idx.
What it buys
On the 48 salient columns the relative weight error falls from 12.30 % with plain rounding to 7.84 % with AWQ run here and 8.61 % for Qwen's release. Over the whole matrix the weight error barely moves (11.01 %, 11.05 %, 10.72 %), and the output error on 4,096 held-out tokens falls from 10.63 % to 10.02 % and 9.91 %. The Each input channel's share of the output error strip shows where the gain is: on the loud channels.
For the whole model, round to nearest here means AWQ's own format without the scales. It changes the first answer token ("Australia's capital is Canberra.") and has a KL divergence of 0.560 nats from the original on the next token; the AWQ release keeps the original answer with a KL of 0.0337. WikiText-2 perplexity is 19.93 for the original, 24.01 rounded to nearest and 23.46 for AWQ. The file is 731 MB against 988 MB; 545 MB of it is the tied embedding, stored twice, as the embedding and as lm_head.
Where AWQ came from
LLM.int8() (2022) found that a few hidden dimensions of large transformers carry outliers far larger than the rest, and kept them in 16 bits. SmoothQuant (2022, the SmoothQuant tab) moved those outliers from activations into weights with per-channel scales so both could be 8-bit. AWQ (2023), from the same group, used the same equivalent transformation the other way round: activations stay 16-bit and the scales protect the weights that the loud channels multiply. GPTQ (the GPTQ tab) reaches a similar error by compensating instead of scaling, and Qwen's q4_k_m GGUF file (the GGUF tab) was made from this release's scaled weights.
Papers
- AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration The method: salient channels found from activations, protected by per-channel scaling and a grid search over the scales' exponent.
- SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models The equivalent per-channel scaling between activations and weights that AWQ reuses.
- LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale Finds the systematic outlier features of large transformers that make a few input channels salient.
- GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers The 4-bit method AWQ compares with, which compensates rounding errors through the inverse Hessian.
- Qwen2.5 Technical Report The Qwen2.5 models, including the 0.5B instruct model whose AWQ release this page records.