AIForum.

What Quantization Changes in a Language Model (and What It Leaves Alone)

On this page

THE SHORT ANSWER

Quantization rewrites a model's weights in lower precision while leaving its architecture, tokenizer, and parameter count intact. The memory savings are predictable; the quality cost is not, because it concentrates in specific inputs, late-layer residual activations, and MLP gate outputs. Here is what actually changes inside the network and how to check the effect on your own prompts.
Quick facts

Quantization changes how a language model stores and computes with numbers. The architecture, tokenizer, parameter count, and context window stay as they were; what changes is that weights — and in some schemes activations or the key/value cache — are mapped from 16-bit floating point into a lower-precision format such as 8-bit or 4-bit integers, with a scale and sometimes a zero point used to reconstruct approximate values at runtime. Memory use drops, and decoding often speeds up on memory-bandwidth-bound hardware. The subtler effect is that every forward pass now runs on slightly perturbed numbers, and how much that matters depends on the model, the task, and the individual input.

This explainer is for practitioners running or evaluating local models who want to know what is actually being altered, why some prompts degrade more than others, and how to verify the tradeoff on their own workload.

What the conversion actually does

Full-precision inference typically uses 16-bit floating point (FP16 or BF16). Quantization replaces those values with a small integer grid. A weight w is stored as an integer q plus a scale s and, in asymmetric schemes, a zero point z, so that w ≈ s × (q − z). The model does not compute in the compressed format end to end: weights are dequantized, or fused into low-precision kernels, so that matrix multiplications can proceed.

Several design choices determine how lossy this is:

  • Granularity. One scale per tensor is cheap and crude; one scale per channel or per small group of weights is more accurate but adds metadata. Group size is one of the most consequential knobs in formats such as GGUF and in methods like GPTQ.
  • Symmetry. Symmetric quantization centers the grid on zero; asymmetric quantization adds a zero point and can fit skewed distributions better.
  • What gets quantized. Weight-only quantization leaves activations at higher precision. Quantizing activations as well (as in some W8A8 schemes) saves more compute but is harder, because activation distributions contain large outliers.
  • The KV cache. Cache quantization is a separate decision from weight quantization. It reduces memory during long-context generation but introduces its own error into attention.
  • Calibration. Post-training methods such as GPTQ and AWQ use a small calibration set to choose scales, so the choice of that data influences the result. Quantization-aware training instead folds the error into training.

What stays the same

A quantized model is not a smaller model in the sense of a distilled or pruned one. The layer count, hidden dimensions, attention heads, tokenizer, vocabulary, and parameter count are unchanged. A “4-bit 8B model” still has roughly eight billion parameters; each one is simply stored with fewer bits. Nothing is removed from the network’s structure, and the context window is not inherently shortened by quantization, though memory pressure may force you to shorten it in practice.

What changes inside the network

The perturbation is small per weight, but it compounds. A 2025 EMNLP study of 3–4 bit weight-only methods on models from 7B to 70B found that quantization errors across 50 method pairs were strongly correlated (average Spearman ρ = 0.82) on FineWeb examples, which suggests a shared, input-driven cause rather than a quirk of any single algorithm. The same work found that the residual stream magnitudes of the full-precision model are indicative of future quantization errors, and proposed that those magnitudes relate to error amplification and accumulation across layers. Using localization techniques, early exiting, and activation patching, the authors showed that examples with large errors depend on precise residual activations in the late layers, and that the outputs of MLP gates play a crucial role in maintaining perplexity (Chang et al., EMNLP 2025).

A separate interpretability study of 4-bit and 8-bit quantization reached a broadly reassuring conclusion about aggregate behavior: the impact on model calibration was generally minor, and the number of dead neurons — units whose activations stay near zero across a dataset — remained consistent regardless of quantization. Neuron-level details did shift: smaller full-precision models showed fewer salient neurons while larger models tended to have more, with Llama-2-7B as an exception, and the effect on neuron redundancy varied by model. The authors concluded that quantization effects may vary by model and task, but they did not observe drastic changes that would discourage its use as a compression technique (Singh and Sajjad, arXiv:2508.16785).

Why some inputs break and others do not

If quantization error were uniform, a model would degrade evenly. It does not. The residual-stream finding explains the pattern: inputs that produce large residual magnitudes push the network into regions where a small numeric error is amplified through many layers, and those are the inputs that fail. That is why a quantized model can look fine on average perplexity while failing on a specific prompt, usually one that demands precise arithmetic, exact formatting, long-context recall, or careful instruction following. It also explains why error is correlated across quantization methods: the difficulty lives in the input and the model’s own activation geometry, not only in the compression scheme.

What this means for local deployment

The headline benefit is memory. Weight storage scales roughly linearly with bits per weight, so the arithmetic is easy:

PrecisionBits per weightApproximate weight memory, 8B parameters
FP16 / BF1616~16 GB
8-bit8~8 GB
4-bit4~4 GB

These figures are illustrative arithmetic for weights only. Real usage is higher: the KV cache grows with context length and batch size, activations and runtime buffers take space, and some formats keep certain tensors — embeddings, normalization layers, or the output head — at higher precision, which raises the total. A model that fits on paper at 4-bit may still run out of memory at long context.

Speed is more situational. Decoding is usually memory-bandwidth-bound, so moving fewer bytes per token often helps; prefill and long-context workloads are more compute-bound, and the benefit shrinks. Kernel quality matters as much as bit width: a well-optimized 8-bit path can beat a poorly optimized 4-bit one.

Quality is where the sources counsel patience rather than a blanket rule. The interpretability study found effects that vary by model and task, with no dramatic collapse; the input-level study found that failures concentrate in specific examples and depend on late-layer precision. Practically, that means the right question is not “is 4-bit good?” but “is this quantization level good enough for my prompts, on this model, at this context length?”

A reproducible check you can run

The studies above use interpretability tooling — activation patching, early exiting, LLM localization — which is more machinery than most users need. A lighter protocol, described here as a suggested procedure rather than a tested benchmark, is enough to make a local decision:

  1. Fix the environment. Use the same runtime, context length, and sampling settings (temperature, top-p, seed) for both variants. Record the exact model file and quantization label.
  2. Build a prompt set from your real work. Twenty to fifty prompts covering the tasks you actually run: extraction, code, summarization, multi-step reasoning, long-context recall, strict formatting.
  3. Run full precision and the quantized variant. Keep the full-precision run as a reference, not as a target to match exactly.
  4. Score at the item level, not just on average. A mean score can hide the two prompts that break. Compare outputs side by side and mark pass or fail per prompt.
  5. Measure cost and speed. Note peak memory and tokens per second for each variant, since those are the reasons you are quantizing in the first place.
  6. Repeat at the next lower bit width. The useful output is the lowest precision that still passes your prompt set.

If you cannot run full precision because of hardware limits, compare two quantized levels instead; the relative comparison still tells you whether the extra compression costs you anything on your tasks.

Limits and open questions

Two cautions are worth keeping in view. First, the evidence base is narrower than the marketing: the input-level study covers 3–4 bit weight-only methods on 7B–70B models, and the interpretability study covers 4-bit and 8-bit settings on a specific set of models. Findings may not transfer to every architecture, mixture-of-experts model, or activation-quantized scheme. Second, “no drastic change” is not “no change.” Quantization is a lossy transformation; the honest position is that it is a reliable compression technique whose cost is concentrated in specific inputs and specific model components, and whose acceptability depends on what you ask the model to do.

If you are deciding today: start at 8-bit when memory allows, move to 4-bit when it does not, and keep a full-precision reference for regression checks on the tasks that matter. Share your model, quantization level, context length, and the prompt that failed in the community — that combination is what makes a quantization report reproducible for the next person.

FAQ

Does quantization reduce the number of parameters in a model?

No. The parameter count, layer structure, and tokenizer are unchanged. Each parameter is stored with fewer bits, so the file and memory footprint shrink while the network keeps the same shape.

Does a 4-bit model use exactly half the memory of an 8-bit one?

Only for the weights. Total memory also includes the KV cache, which grows with context length and batch size, plus activations and runtime buffers. Some formats also keep certain tensors at higher precision, so actual usage is higher than the weight-only arithmetic suggests.

Why does a quantized model fail on one prompt but handle others fine?

Research indicates that inputs producing large residual stream magnitudes are the ones where small numeric errors get amplified across layers. Those examples rely on precise residual activations in late layers, which is why failures are input-specific rather than uniform.

Is quantization safe to use in production?

The interpretability study found no drastic changes that would discourage quantization as a compression technique, but effects varied by model and task. The practical answer is to validate the specific quantization level on your own prompts and context length before relying on it.

Does quantization change the tokenizer or context window?

No. Quantization only changes numeric precision. The tokenizer and context window are properties of the model configuration, though limited memory may force you to run a shorter context in practice.

References

  1. https://arxiv.org/html/2508.16785v3
  2. https://aclanthology.org/2025.emnlp-main.168/

Related terms

Quantization
Storing model values in a lower-precision numeric format, such as 8-bit or 4-bit integers, instead of 16-bit floating point.
Post-training quantization (PTQ)
Compressing an already trained model using a small calibration dataset, without retraining.
Weight-only quantization
A scheme that compresses weights while leaving activations at higher precision, which is easier than quantizing both.
Group size
The number of weights that share one scale and zero point; smaller groups are more accurate but add metadata.
Scale and zero point
The two values that map an integer back to an approximate real number: w ≈ s × (q − z).
KV cache quantization
Compressing the stored key and value tensors used during generation, a decision separate from weight quantization.
Perplexity
A measure of how well a model predicts a text sample; it is an average, so it can hide input-specific failures.
Residual stream
The running hidden representation passed between layers; its magnitude in the full-precision model is indicative of future quantization error.

Leave a Reply

Your email address will not be published. Required fields are marked *