Hypothetical scenario. Northwind’s scheduler has explicit admission limits. Dev brings a lower-bit weight artifact to reduce its payload. Maya asks whether policy answers still meet the task; Priya notices that long conversations retain their own memory demand.
Maya: “Fitting the weights is useful, but does the model still handle the exceptions?”
Dev: “The bit width changes weight payload; the runtime must support the format.”
Priya: “Keep quality and the rest of resident memory in the decision.”
You will compare idealized FP16, INT8 and INT4 payloads, then distinguish AWQ and GPTQ from generic low-bit labels. Assess calibration, supported execution and task quality separately from byte arithmetic.
What does a smaller weight representation actually change?
For a chosen billion scalar weights, FP16 payload is 1,000,000,000 × 2 = 2,000,000,000 bytes. INT8 payload is one billion bytes, and packed INT4 payload is half a billion bytes before scales, grouping, metadata and alignment. These are idealized storage counts, not resident-memory or speed measurements. Execution support and task quality still decide whether a representation is usable.
AWQ uses activation information to guide weight quantization; GPTQ uses calibration and an approximate second-order reconstruction approach. Both must be judged with the selected model, calibration distribution, runtime kernels and task set. Their names are not interchangeable labels for any four-bit file. Keep the original derivations below separate from the smaller weight payload: KV state, activations and workspace do not vanish when weights use fewer bits.
The smaller model file still exceeds the service budget
Northwind wants to operate a support model within a fixed accelerator budget. Dev produces a low-bit weight artifact and expects the service to accept more conversations. Sam notices that long sessions still exhaust memory and that the selected runtime spends time converting the representation. Priya asks whether the compressed version still handles rare policy exceptions.
The team has three different questions: how much weight storage changed, how the serving implementation executes it and which task behaviors changed. A file-size comparison answers only the first. Start with a resource ledger and an evaluation set before choosing a quantization label as the deployment plan.
Treat quantization as an evaluated execution change
Hypothetical scenario. INT4 weight payload can be smaller than FP16, but the served system also includes scales, metadata, runtime workspaces and active KV state. Specify whether weights, activations or both are quantized and whether compatible kernels execute the selected representation.
| Artifact | Concrete evidence | Decision boundary |
|---|---|---|
| Format artifact | precision, scales, calibration identity | Numerical representation |
| Runtime | supported kernels, layout, workspace | Actual execution |
| Release evidence | task cohorts, memory, useful latency | Decision basis |
AWQ and GPTQ make different approximation choices under their methods; neither name certifies the application task. Compare the candidate with the base on the same cases and request mix, including rare required cohorts. Calibration data and workload distribution matter. A smaller file that forces expensive conversions or changes answer correctness can fail the decision even when its nominal bit count improves.
A numerical level stands for an interval of real values
A simple symmetric uniform quantizer chooses a scale and a finite range of integer levels. It rounds a scaled real value to a nearby level and clips values beyond the available range. Reconstructing a real value multiplies the stored level by the scale. Real formats can use different zero points, grouping and special encodings; the simple example makes rounding and clipping visible.
Hypothetical scenario. Choose stored levels from −7 through 7 and a scale of 0.1. The value 0.26 becomes level 3 and reconstructs as 0.3, an absolute error of 0.04. The value 0.72 clips to level 7 and reconstructs as 0.7, an absolute error of 0.02. With a value 1.2, the same clip reconstructs 0.7 and the error becomes 0.5.
A range that resolves small values finely can clip larger ones; a wider scale avoids some clipping but spaces nearby levels farther apart. Calibrating the representation is therefore about the error that matters to the computation, not just the smallest bit count. Different layers and channels can be sensitive to different approximations.
Weight error interacts with the input activation
Consider a linear layer with original weight W and quantized reconstruction Wq. For a fixed input x, the output difference is (Wq − W)x. The same weight error can matter differently for different inputs. Evaluating only the numerical distance between weight arrays can miss the activation patterns that make a task sensitive.
For a toy two-component dot product, choose original weights (0.26, 0.72), reconstructed weights (0.3, 0.7) and input (2, 1). The original output is 0.26 × 2 + 0.72 × 1 = 1.24. The reconstructed output is 0.3 × 2 + 0.7 × 1 = 1.3. The difference is 0.06. This is selected arithmetic, not a model-quality measurement.
A calibration collection supplies example activation behavior for deciding how to represent weights. It should reflect the input distribution that the deployment needs, without consuming the final task test. A convenient general text collection can miss the domain's unusual identifiers, output formats or input modalities. Calibration suitability and final task quality require separate evidence.
GPTQ and AWQ use different routes to weight-only approximation
The GPTQ paper presents post-training weight quantization using approximate second-order information. The AWQ paper presents activation-aware weight quantization using activation information in its scaling choices. Both are concrete methods for reducing a weight representation; neither name establishes the best result for every model and serving stack.
Compare their actual supported formats, calibration assumptions and execution requirements. A method's research result is evidence for its reported setup, not a promise that Northwind's accelerator, runtime version and task will reproduce the same quality or timing. Avoid converting a published benchmark into an owner experiment or a universal ranking.
Weight-only quantization also describes a scope. It does not establish that activations or the attention key/value cache use the same precision. If cache growth dominates concurrent-session memory, changing weight precision alone leaves that limiting growth in place.
Count scales and other allocations beside the packed weights
Choose a hypothetical model with one billion stored weights. At 16 bits each, raw weight payload is 1,000,000,000 × 16 / 8 = 2,000,000,000 bytes. At four bits each, packed weight payload is 1,000,000,000 × 4 / 8 = 500,000,000 bytes. The raw selected difference is 1,500,000,000 bytes.
Now choose groups of 128 weights and assume one two-byte scale per group. There are 1,000,000,000 / 128 = 7,812,500 groups. Scale payload is 7,812,500 × 2 = 15,625,000 bytes. Packed weights plus these selected scales total 515,625,000 bytes, before any zero points, padding, metadata or runtime representation.
Suppose the service separately needs an assumed 1,000,000,000 bytes for cache and other allocations. The selected total falls from 3,000,000,000 bytes to 1,515,625,000 bytes. Its ratio is about 1.98, not four. These are chosen values for understanding accounting, not capacity estimates for a named model or accelerator.
A storage format needs a supported arithmetic path
A serving kernel must interpret the packed representation and perform the required operation. Hardware support, packing, group layout, dequantization and data movement affect execution cost. An implementation that repeatedly converts weights into a larger working representation can have a different allocation and timing profile from the artifact on disk.
Measure separately where the original service spent time. Decode can involve moving weights for a small amount of work per active sequence; prefill can have a different balance of computation and movement. Changes in batch shape and session length can change the bottleneck. A useful compression result does not determine these timing relationships by itself.
Keep the model architecture, tokenizer and representative input shape fixed where the comparison requires them. Record the artifact format and runtime revision. If deployment silently selects a fallback kernel, the intended low-bit execution may not be the operation being measured.
Task quality needs sensitive categories as well as averages
Evaluate supported answers, structured output, tool proposals and abstention on the actual task. Include categories where a small score change has a large consequence, such as near-matching identifiers or uncommon policy conditions. Report the original and quantized results under the same rubric instead of treating aggregate language-model loss as a complete application acceptance test.
A candidate might preserve common answers while changing rare behavior. That is a release question, not evidence that every quantization method fails. Inspect the paired failures, the calibration distribution and the affected computations. Choose a different precision or keep the original artifact if the task trade is unacceptable.
In the wild: two published approximation methods
GPTQ and AWQ provide primary research descriptions of their weight-quantization approaches. Read the experiments as scoped results with models, hardware and evaluation choices. Their useful role here is to explain how approximation decisions can account for more than raw weight magnitude.
Hypothetical scenario. Northwind calibrates on short ordinary replies, then deploys to long document-heavy sessions. Weight memory falls, but cache growth still causes admission failures. Restore the prior admission contract and profile the full workload. The calibration and serving mismatch is more informative than declaring a bit width sufficient for all traffic.
Choose compression for a measured resource constraint
Quantization is useful when the supported execution path and accepted task trade improve a real resource constraint. It is less useful when the bottleneck lies in retrieval, network waits or uncontrolled concurrency. If the application mostly waits on a remote tool, reducing local weight payload may have little effect on total response time.
Retain the original artifact and its evaluation record for rollback. Version quantization configuration and calibration lineage with the derived artifact. Changing format, runtime and input policy together makes the result hard to diagnose; isolate changes where possible and still evaluate the deployed combination.
Weight precision and cache precision are separate decisions
During autoregressive serving, cached keys and values grow with the admitted sequences and their retained positions. Compressing weights changes a mostly fixed component while cache usage follows the live workload. If the service admits more sessions because the weight payload shrank, the additional cache can consume much of the reclaimed space. Recompute admission with the chosen sequence bounds rather than assuming the entire saving remains free.
Quantizing cache values is a separate approximation with its own representation and execution requirements. Do not carry a weight-quantization evaluation over to that change. The values serve a different computational role, and a runtime can support one low-bit path while retaining another component at higher precision.
Keep calibration and final acceptance evidence separate
Calibration helps choose representation settings. Repeatedly adjusting those settings because they improve the same final examples turns the final test into development evidence. Preserve an independent task comparison and record which cases informed calibration. Include representative long inputs and output constraints, while retaining rare diagnostic cases whose cost of failure differs from common traffic.
A revision can be accepted for one service class and rejected for another. Record that scope explicitly instead of describing a quantized artifact as universally production-ready. The useful result is a bounded deployment decision supported by evidence, not a competition between compression labels.
Test the format artifact boundary
The file shrinks but peak memory barely changes. Is the measurement necessarily wrong?
Reveal the design reasoning
No. Other live state or workspace can dominate. Inspect component lifetimes and allocation, then evaluate actual task behavior. Do not equate weight bytes with the entire service footprint.
Decision: Approve numerical formats with task and runtime evidence, retaining a compatible rollback artifact.
Separate payload, arithmetic and application claims
Four-bit weights replace 16-bit weights. Must total serving memory fall by four?
No. Scales, metadata and separately stored cache and activations remain. In the selected example, a 3,000,000,000-byte total becomes 1,515,625,000 bytes, a ratio near 1.98. Define the complete allocation before making a capacity claim.
The quantized artifact is smaller, but decode slows. Is the file-size calculation wrong?
Not necessarily. Storage and execution answer different questions. Inspect kernel support, conversion, memory movement and batch shape. A correct packed payload calculation does not prove that the runtime executes it efficiently.
Average task quality is unchanged, but rare identifier mistakes increase. Can the candidate pass automatically?
No. Review the relevant acceptance category and paired failures. Averages can conceal important regressions. Improve calibration, adjust precision or retain the previous artifact according to the actual task contract.
Northwind decision log
- Measure the limiting allocation before choosing a quantized representation.
- Version the format, calibration inputs and supported execution kernel.
- Compare task-sensitive failures and complete serving costs before release.
Go deeper: numerical execution and resource accounting
- Video lecture: Let's reproduce GPT-2 (124M), Andrej Karpathy. Follow the relationship between numerical choices and efficient model execution.
- Book chapter: The Elements of Computing Systems, chapter 2: Boolean Arithmetic, Noam Nisan and Shimon Schocken. Understand the finite bit representations underlying arithmetic.
- Book chapter: The Elements of Computing Systems, chapter 3: Memory, Noam Nisan and Shimon Schocken. Connect stored bit payload with a concrete memory model.
- Primary paper: GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers, Elias Frantar and colleagues. Examine the stated approximation method and experimental scope.
Check the mechanism in this lesson
Does halving ideal weight bytes imply halving all resident memory?
Compare the explanation
No. KV state, activations, quantization metadata and workspace follow their own accounting. Supported kernels and task quality also remain separate requirements.
Carry the decision forward
Northwind has separated weight storage, execution and quality. Page 33 considers a different intervention: a smaller model proposes draft tokens while the target retains decoding authority.