Quantization
What is Quantization?
Quantization is a technique that stores an AI model's numbers at lower precision, such as 8 or 4 bits instead of 16, reducing memory needs and cost with a small effect on quality.
Updated November 2026 · 2 min read
Quantization is a technique that makes AI models smaller and cheaper to run by storing their numbers with less precision. Model weights are typically stored as 16-bit numbers. Quantization converts them to 8-bit, 4-bit or even lower precision. An 8-bit model needs about half the memory of a 16-bit one, and a 4-bit model about a quarter. Smaller models fit on fewer or cheaper GPUs, load faster and often run faster. The cost is a small loss of accuracy, which can be negligible or significant depending on the model, the method and the task.
Why memory matters
Running a language model requires holding all its weights in GPU memory, along with working memory for each request. A model with 70 billion parameters at 16-bit precision needs about 140 gigabytes for its weights alone, more than an 80-gigabyte GPU such as NVIDIA's H100 holds. Quantized to 4 bits, it needs about 35 gigabytes, which fits on one with room to spare. Newer GPUs with more memory, such as the 192-gigabyte B200, change where these limits fall but not the basic trade-off. Less memory for weights also leaves more room for the KV cache, allowing more requests to run at once.
Types of quantization
- Post-training quantization: converting a trained model's weights to lower precision, often using a small calibration dataset to minimize accuracy loss. Methods such as GPTQ and AWQ became widely used for language models from 2022 and 2023.
- Quantization-aware training: training the model with lower precision in mind, which usually preserves more accuracy.
- Weight-only quantization: compressing weights while computing at higher precision.
- Weight and activation quantization: compressing both, for faster computation on hardware that supports low-precision math.
- KV cache quantization: compressing the memory used per request.
Many open-weight models are published with official quantized versions, and newer hardware supports 8-bit and 4-bit formats directly.
Does quantization reduce accuracy?
Quantization affects tasks differently. General conversation may be unaffected, while precise math, code or rare languages degrade more. Always test on your own evaluation set. See AI evaluation.
An example
Consider a hypothetical company that self-hosts a 70-billion-parameter open-weight model on two 80-gigabyte GPUs for an internal knowledge assistant. It tests an 8-bit version and a 4-bit version on 2,000 questions. The 8-bit version scores within half a percentage point of the original. The 4-bit version drops about three points, mostly on questions involving numbers. The company deploys the 8-bit version on a single GPU, halving its hardware cost, and keeps the 4-bit version for a less demanding document-tagging task.
Common pitfalls
- Quantizing without testing on real tasks.
- Going too low: very aggressive quantization can damage quality badly.
- Assuming speed gains, which depend on hardware support for the format.
Quantization is a standard technique in inference optimization and self-hosting.
Frequently asked questions
How much GPU memory does quantization save?
Moving from 16-bit to 8-bit weights roughly halves memory, and 4-bit weights need about a quarter. A 70-billion-parameter model needs about 140 gigabytes for its weights at 16 bits, more than an 80-gigabyte GPU holds. Quantized to 4 bits, it needs about 35 gigabytes and fits on one GPU, with room left for the KV cache.
How much accuracy does a quantized model lose?
It varies with the model, the quantization method, the precision and the task. General conversation may show no visible change, while precise math, code and rare languages tend to degrade more, and very aggressive quantization can damage quality badly. Compare quantized versions with the original on your own evaluation set before choosing one to deploy.
What is the difference between post-training quantization and quantization-aware training?
Post-training quantization converts an already trained model's weights to lower precision, often using a small calibration dataset to limit accuracy loss. GPTQ and AWQ are widely used methods for language models. Quantization-aware training builds lower precision into the training process itself, which usually preserves more accuracy but means training the model rather than converting one.
Related terms
KV Cache
Memory that saves a model from recomputing tokens it has already processed.
AI Evaluation
Testing models against defined tasks so quality holds as costs come down.
Inference Optimization
Making models faster and cheaper to run without losing too much quality.
Self-Hosted LLM
A language model run on infrastructure the organization controls.