LLM quantization explained: speed vs accuracy
LLM quantization explained: how smaller model weights speed up inference, where accuracy drops, and how to test the trade-off on your own data.
Updated
LLM quantization stores a model’s weights with fewer bits per number. A smaller model needs less memory, and moving less data for each token often makes generation faster. The cost is rounding. Each weight is approximated, so some outputs change, and the change is not always small. Whether that matters depends on your task and on how you measure it.
What quantization changes inside the model
A trained model is a large set of numbers called weights, usually kept at high precision. Quantization maps each weight onto a smaller set of allowed values. The architecture stays the same, so you get the same model with rounded weights.
Memory is the easiest part to estimate. Weight memory is roughly the parameter count times the bits per weight, divided by eight. For an illustrative model with 8 billion parameters, 16-bit weights take about 16 GB and 4-bit weights about 4 GB. The real footprint is higher, because the runtime also needs room for the KV cache and working buffers, so budget for those separately.
Speed comes from the same change. Each generated token reads the weights, and that data movement is often where the time goes. Fewer bytes per weight means less to read. The gain is not guaranteed. Some runtimes handle compressed formats poorly, so measure throughput instead of assuming it.
Where the accuracy goes
Rounding hurts most where the model is least certain. A question with one clear answer often survives. A long chain of reasoning, a rare term, or a figure in a dense table is more likely to tip over. Errors also compound. One changed token early in a long output can send the rest of the answer in a different direction.
An average score can hide this. Suppose a baseline passes 94 of 100 cases and a candidate passes 91. The drop looks small, but if all three new failures are wrong dollar amounts, the cost of those failures may be far higher than three points suggests. Sort failures by type. Wrong amounts, missed clauses, invented fields and broken JSON each carry a different cost.
Watch for failures that still look fluent. A quantized model can produce a clean-looking answer with a missing closing brace or a field renamed by one character. A parser catches that, but only if your pipeline checks for it.
To test a quantized model, run it and the current model on the same checked inputs with the same prompt and decoding settings, and list every case it fails that the baseline passes, since one new wrong amount or broken JSON costs more than the average shows. Measure speed at the concurrency you actually run, as concurrency in LLM serving explains, and if the candidate adds failures on the costly error types, try a higher-precision format before you give up on a smaller footprint. The full method is in how to build a test set.
Common mistakes
- Testing on easy examples. A clean score on generic text says little about your invoices, clauses or tickets.
- Changing the prompt between runs. A new prompt can move the score more than quantization does, so hold everything else fixed.
- Judging speed from one request. Queueing only appears under load, so time the server at real concurrency.
- Reading only the average. Two candidates with the same average can fail on very different cases.
- Forgetting memory headroom. The weights fit on paper, then the context cache runs out of room at the document length you actually send.
When quantization is the right call
Quantization fits when the task is narrow, the test shows no meaningful drop on the cases that matter, and the smaller footprint lowers cost or lets you run the model in your own environment. It fits poorly when the task depends on long reasoning or exact copying of rare text and the test shows a drop. Do not decide from a general claim in either direction.
Quantization is one lever among several, and the others change different things. A smaller or trained model is a different model, chosen for a narrower job. Distillation trains a small model to copy a larger one’s behavior. Batching and caching change how the server uses hardware, not the weights. Speculative decoding uses a small draft model whose proposed tokens a larger model checks. These can be combined, but each needs its own test. To see what a throughput change is worth in your own spend, the LLM cost calculator takes your volume and token counts. Read how to interpret tokens per second before you trust any speed figure, since throughput and latency measure different things.
Memory is often the limit when you run a model in your own cloud account or on-prem, so smaller weights can matter more there. Own Weights fine-tunes an open-weight model for one high-volume task a company now sends to a frontier API, tests it against the current model on the company’s own data, and serves it in the customer’s cloud account or on-prem. The customer owns the weights. Start from the homepage to see how that works.
If you want to know whether a smaller or trained model would hold up on one of your tasks, book a free audit. The audit maps your AI spend by task. From there, we build a test from your own data, score the current model first, and deploy nothing unless the trained model beats that score on the test.
Questions
Does LLM quantization reduce accuracy?
It can. Lower precision rounds the weights, so some outputs change, and the loss tends to be larger on hard or unusual inputs. Measure it on your own test set rather than relying on a general claim.
Is quantization the same as distillation?
No. Quantization keeps the same model and stores its weights with fewer bits. Distillation trains a smaller model to copy the behavior of a larger one.
How do I know if a quantized model is good enough for my task?
Build a test from real examples from your own work, score the current model first, and run the candidate on the same examples. Read the failure cases, not only the average score.