FDEInterviews logo
MLSys 2024 (Best Paper)

AWQ: Activation-aware Weight Quantization for On-Device LLM Compression and Acceleration

MIT's 4-bit weight quantization that asks the activations which weights matter, protects about 1% of channels by scaling instead of keeping them in 16-bit, and runs over 3× faster than FP16 on GPUs.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2023
AUTHORS
Lin, Tang, Tang, Yang, Chen, Wang, Xiao, Dang, Gan, Han
FROM
MIT, Shanghai Jiao Tong University, NVIDIA, Tsinghua, MIT-IBM Watson AI Lab, UMass Amherst
PUBLISHED
Jun 2023 · MLSys 2024 (Best Paper)
CITED BY
1,957Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 24% of this breakdown.

01

The paper in one minute

When a model generates text one token at a time, each step reads every weight from memory and does very little arithmetic with it. Generation is memory-bound, so storing weights in 4 bits instead of 16 cuts memory traffic about 4× and, with the right kernels, speeds generation up. The problem is accuracy: simple rounding to 3 or 4 bits hurts, and the best method at the time, GPTQ, reconstructs weights against a calibration set and can overfit to it.

AWQ, from Song Han's lab at MIT with collaborators at SJTU, NVIDIA and Tsinghua, starts from an observation. Not all weights matter equally: keeping just 0.1% to 1% of weight channels in 16-bit while rounding the rest recovers most of the lost accuracy, but only if you pick the right ones. Picking channels with the largest weights does about as well as picking at random. Picking the channels that receive the largest activations works, because those channels process the most important features.

Mixed precision is awkward for hardware, so AWQ protects those channels a different way. Multiply a weight channel by a factor s greater than 1 and divide its input by s: the layer's output is unchanged, but the channel's rounding error becomes smaller relative to its size. AWQ sets s from each channel's average activation magnitude raised to a power α, and finds α with a quick grid search on a small calibration set, with no backpropagation or reconstruction. Every weight stays in low bits.

The method beat plain rounding and GPTQ on LLaMA and Llama-2 models at 3 and 4 bits, held up when the calibration data came from a different domain, and worked for instruction-tuned and multimodal models. The authors also built TinyChat, an inference engine with fused 4-bit kernels, which ran more than 3× faster than the Hugging Face FP16 implementation and put Llama-2-70B on a 64 GB Jetson Orin.

THE IDEA, VISUALLY
PROTECT THE CHANNELS THE ACTIVATIONS SAY MATTER OPT-6.7B, 3-bit, group 128, WikiText perplexity (Tables 1, 3) round-to-nearest PPL 23.54 all weights 3-bit keep 1% salient in FP16 PPL 11.39 mixed precision, slow on hardware AWQ: scale salient channels PPL 11.39 all weights 3-bit, same speed Which 1%? By activation size: PPL 11.39. By weight size: 22.37. At random: 24.23. FP16 model: 10.86 (Table 1). Multiply a salient channel by s and divide its input by s: same output, but the channel's rounding error shrinks relative to its size. AWQ picks s from activation statistics with one searched exponent; no backpropagation. LLAMA-2-7B PERPLEXITY (TABLE 4) 3-bit 4-bit FP16 round-to-nearest 6.66 5.73 5.47 GPTQ 6.43 5.69 GPTQ-reorder 6.42 5.63 AWQ 6.24 5.60 CALIBRATE ON ONE DOMAIN, TEST ON ANOTHER perplexity increase, OPT-6.7B 3-bit (Figure 8) AWQ +0.5 to 0.6 GPTQ +2.3 to 4.9 TinyChat runtime: over 3× faster than Hugging Face FP16 on desktop and mobile GPUs; Llama-2-70B on a Jetson Orin.
Which 1% of weights to protect is decided by the activations, not by the weights themselves. Scaling those channels before quantizing gives the benefit of mixed precision while keeping every weight in low bits.
Research notes: the problem, approach and results
1%

of weight channels, chosen by activation size, recover most of the accuracy lost to rounding

+0.5 vs +4.9

perplexity increase with a mismatched calibration domain, AWQ vs GPTQ

>3×

speedup over Hugging Face FP16 on desktop and mobile GPUs with 4-bit AWQ and TinyChat

THE PROBLEM

4-bit weights cut memory and speed up generation, but plain rounding loses accuracy at 3 to 4 bits, and the best method then (GPTQ) could overfit its calibration data and hurt other domains.

THE IDEA

About 1% of weight channels matter far more than the rest, and they are the ones fed by large activations. Scale those channels up before quantizing and scale their inputs down, so every weight stays 4-bit.

THE RESULT

Lower perplexity than rounding and GPTQ on LLaMA and Llama-2 at 3 and 4 bits, robust across calibration domains, working for instruction-tuned and multimodal models, and over 3× faster than FP16 with TinyChat.

02

Why it matters to an FDE

AWQ is one of the standard ways to ship 4-bit open models; many published checkpoints are "AWQ" versions, and serving stacks such as vLLM, TensorRT-LLM and Hugging Face support them. For self-hosted deployments it changes what hardware a customer needs.

Quantization buys memory and speed for generation. A 4-bit model needs about a quarter of the memory for weights, which can mean one GPU instead of two, or a laptop or edge device instead of a server. Because decoding is memory-bound, fewer bytes per weight also means faster tokens at small batch sizes.

Calibration data can matter less than you think, which is good. AWQ only collects activation statistics and does not fit weights to the calibration set, so it was much less sensitive to calibration domain than GPTQ. For customer models in specialized domains, that reduces the risk of a quantized model doing well on generic text and worse on the customer's data.

Still evaluate on the customer's tasks. Perplexity on WikiText is the paper's main measure. Run the customer's evaluation on the quantized model before switching, especially for math, code and long reasoning, where small errors compound.

Weight-only quantization helps decoding most. Under large batches, serving becomes more compute-bound and the speed gain shrinks; memory savings remain. Measure throughput at the customer's real batch sizes.

3-bit is possible; 4-bit is the safe default. At 4 bits AWQ was close to FP16; at 3 bits the gap was noticeable even with AWQ.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 49 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦4 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The saliency finding, the scaling trick, the system work, and the misreadings to avoid

    Free account
  2. 04How it works

    The error analysis behind scaling, the search, and TinyChat's kernels

    Premium
  3. 05The numbers that matter

    Perplexity tables, generalization results, speedups, and an inconsistency in the paper

    Premium
  4. 06Try it yourself

    Build a layer with outlier activation channels and compare rounding, mixed precision and AWQ scaling

    Premium
  5. 07Where it breaks

    Where weight-only quantization and AWQ's assumptions stop helping

    Premium
  6. 08Using it on a deployment

    Deciding on and validating a 4-bit model for a customer

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →