AI GLOSSARY · LOCAL AND OPEN MODELS
Quantization
Definition
Quantization stores a model's weights, the numbers learned in training, in fewer bits so the model needs less memory and can run on smaller hardware, usually at some cost in accuracy.
Also called: model quantization, LLM quantization, quantized model, quantized models, quantization meaning.
In plain language
Quantization is like saving a photo at a lower resolution. An AI model is a very large set of numbers, called weights, and each one is normally stored with fairly high precision. Quantization stores them with fewer bits, which can reduce weight storage and may help a model fit on available hardware. Total memory also depends on runtime overhead and the task. The trade-off is accuracy: Hugging Face's documentation says fewer bits cost some accuracy, and each method balances memory, speed and accuracy differently. A quantized model can therefore behave slightly worse than the original, sometimes in ways that only show on your own tasks. If you run models yourself, treat the smaller file as a trade, test it on real work, and do not assume the quantized version matches the original model's published quality.
Technical definition
Quantization maps weights, and sometimes activations, from a high-precision format such as 16-bit floating point to a lower-precision one such as 8-bit or 4-bit integers. Hugging Face documentation gives bf16 as typically 2 bytes per parameter, so an 8-billion-parameter model needs about 16 GB for weights in bf16, about 8 GB at 8 bits and about 4 to 5 GB at 4 bits, before anything else. IBM distinguishes post-training quantization, applied to an already trained model without retraining, from quantization-aware training, applied during pre-training or fine-tuning, which usually performs better but costs more. Methods such as AWQ, GPTQ and bitsandbytes differ in accuracy, speed and hardware support, and GGUF is a single-file format that stores the weights, config and tokenizer.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
local-model-sizing 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A calculation of whether an open-weight language model will run on a given GPU, Mac or PC, using a script that computes the memory the weights need.
- Why it exercises the concept
- Reducing the memory needed by model weights is one practical use of quantization. The self-hosting guide on this site says this skill gives memory figures for each quantization level, so you can compare options before downloading.
Guide · Illustrative, not executed
Self-Hosting an AI Agent: What You Take On
- What you see
- A guide to what you take on when an agent runs on your machine, including matching the model to your hardware and checking that it fits.
- Why it exercises the concept
- It names the failure quantization is meant to prevent, a model that does not fit in memory, and suggests a smaller model or a more compact quantization as the response.
How it shows up when you use agents
If you run a model locally for a coding agent, you will often be choosing among quantized versions of it. IBM says quantization is what lets models run on laptops, phones and older hardware. The choice is a memory budget decision: the model's weights have to fit in your graphics card or computer memory, and the Hugging Face documentation gives sample weight sizes at 16, 8 and 4 bits.
What breaks when this is misunderstood: you pick the smallest version to fit, then blame the agent for weaker answers when the cause may be lost precision. Hugging Face's documentation says fewer bits cost some accuracy and that methods differ. The safer habit is to start with the highest precision that fits your memory, run the same small task you care about on each candidate, and keep the one that passes. local-model-sizing gives memory figures per level. See Self-hosted LLM and Inference.
Next action: before downloading, write down your memory budget and compare it with each version's size, leaving room beyond the weights.
Common confusions
- Quantization versus compression of files. Zipping a file loses nothing. Quantization changes the stored numbers to lower precision, so the model's behaviour can change.
- Quantization versus distillation. Quantization keeps the same model and stores it more compactly. See Distillation.
- Post-training versus quantization-aware training. IBM distinguishes post-training quantization from quantization-aware training, which it says usually performs better but costs more.
- Myth. "A quantized file always uses less memory when loaded." The cited Transformers GGUF guide distinguishes packed-quantized loading for supported architectures and kernels from legacy paths that dequantize weights. The file extension alone does not determine loaded memory; check the exact model, runtime version and kernel requirements.
Related terms
Show all 30 related terms
Terms that mention Quantization
25 terms mention this one
- AWQ quantization
- Distillation
- FLOPS (floating-point operations per second)
- GGUF
- GPTQ
- GPU for AI
- Llama (Meta)
- llama.cpp
- LM Studio
- LoRA (low-rank adaptation)
- Matryoshka embeddings
- Milvus
- Mixed-precision training
- MLX (Apple)
- Model weights
- Neural processing unit (NPU)
- NVIDIA NIM
- Ollama
- On-device AI
- ONNX (Open Neural Network Exchange)
- Open-weights model
- Small language model (SLM)
- Speculative decoding
- TensorRT
- vLLM
Guides that mention Quantization
More in Local and open models
Sources
- GGUF (Transformers 5.24.1), Hugging Face (Transformers documentation) (accessed 2026-11-24)
- Quantization overview, Hugging Face (Transformers documentation) (accessed 2026-11-23)
- What is quantization?, IBM (accessed 2026-11-23)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by claude-sonnet-5-5; sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (6)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : Reset legacy self-verification metadata to pending for the independent release gate; preserved earlier history.
- : Corrected bounded independent source-review scope/example findings; affected-claim re-review pending.
- : First version.
- : Verifier pass: Reworded IBM distinction, removed uncited distillation claim and KV-cache phrase, reworded hf-cli example.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.