Up nextNext guide
Influence Functions for Training Data Attribution
Technical
Technical GUIDE
GPTQ and AWQ are two leading methods for shrinking already-trained language models to 4-bit precision so they run on cheaper, smaller hardware.
Listen to this guideAI-narrated · ~2 min
They are why you can run a capable model on a single consumer GPU instead of a datacenter rack.
Post-training quantization (PTQ) compresses a finished model without retraining it, mapping high-precision weights down to 4 bits to roughly quarter the memory. The challenge is doing this without wrecking accuracy. GPTQ (a refinement of OBQ) quantizes weights layer by layer, using second-order information from a small calibration dataset to adjust the remaining weights and compensate for each rounding error. AWQ (Activation-aware Weight Quantization) takes a different angle: it observes that a small fraction of weight channels are disproportionately important, identified by looking at activation magnitudes, and protects those salient channels by scaling rather than quantizing them aggressively. Both let models like Llama run in 4-bit, and tools such as vLLM, llama.cpp, and AutoGPTQ have made them mainstream for local and cost-efficient inference.
Running a 70-billion-parameter Llama model on a single 24 GB consumer GPU using 4-bit GPTQ weights.
AWQ-quantized models served at high throughput in vLLM for cost-efficient production APIs.
llama.cpp using quantized GGUF weights to run language models locally on a laptop CPU.
Hugging Face's AutoGPTQ and AutoAWQ libraries letting developers quantize a downloaded model in a few lines of code.
Quantization is pushing below 4 bits toward 3-bit, 2-bit, and mixed-precision schemes, often combined with sparsity. Expect closer coupling with serving engines so quantization, KV-cache compression, and speculative decoding work together. Hardware support for low-bit formats like NVFP4 and MXFP4 is maturing, and automated tools will increasingly pick per-layer bit widths. The broad goal is near-lossless 4-bit (and lower) as the default, making strong models cheap to serve everywhere.
Free newsletter
One short email each weekday with the three AI stories that actually matter. Free forever, no ads.
One email each weekday. Unsubscribe in one click. We never sell or share your address.
Test yourself
Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.
Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation
GPTQ and AWQ are two leading methods for shrinking already-trained language models to 4-bit precision so they run on cheaper, smaller hardware. They are why you can run a capable model on a single consumer GPU instead of a datacenter rack.
Post-training quantization reduces the precision of a finished model's weights (e.g., to 4 bits) without retraining it from scratch.
GPTQ uses an approximate Hessian to understand how quantizing one weight affects the loss, then adjusts remaining weights to compensate.
AWQ identifies salient weight channels using activation magnitudes and protects them via scaling, since a few channels matter disproportionately.
Going from 16 bits to 4 bits per weight cuts weight memory to about a quarter, roughly a 4x reduction.
Weights are the main memory cost, while activations are more sensitive to precision loss, so weight-only quantization is the common sweet spot.
Keep learning
More guides picked for this topic
Up nextNext guide
Influence Functions for Training Data Attribution
Technical