Quantization – explained simply
Quantization stores a model’s numbers with fewer bits so it needs less memory and runs on weaker hardware.
Also: quantized, Quantization, quant, 4-bit, 8-bit
Normally, each parameter is a decimal number with 16 or 32 bits. Quantization rounds these values to a coarser grid, such as 8 or 4 bits. Comparison: instead of writing a price down to the cent, you only write whole euros. This saves space, but is a bit less precise.
The effect is big: from 32 to 8 bits, memory usage drops to one quarter. Moderate quantization usually costs little quality, while very strong quantization (2 to 3 bits) is noticeable. The loss is often measured with metrics like perplexity.
For language models, quantization via GGUF is standard. For image models, you are more likely to see fp8 variants or also quantized versions.
What does that mean for you? Choose the largest quantization that still fits completely in your VRAM; that is almost always better than an unquantized model with offloading.
Related terms
Errors where that matters
- faster-whisper: Requested float16 compute type, but the target device or backend do not support efficient float16 computation (rechen format doesn't match the device)
- llama.cpp (Vulkan): vk::Device::allocateMemory: ErrorOutOfDeviceMemory (graphics memory block too large or VRAM full)
- llama.cpp: CUDA error: out of memory
- LM Studio: Error loading model. (Exit code: …) Unknown error (model won’t load)
- LM Studio: Model loading was stopped due to insufficient system resources
- Ollama uses the CPU instead of the graphics card
- Ollama: model requires more system memory
- Ollama: pull model manifest: 412 (newer version required)
- Ollama: pull model manifest: file does not exist (model name or tag does not exist)
- Unexpected architecture type in GGUF file (ComfyUI-GGUF doesn’t know the model yet)
- Very slow responses because the model does not fit in VRAM
- vLLM: The model's max seq len is larger than the maximum number of tokens that can be stored in KV cache / No available memory for the cache blocks (context does not fit in the VRAM)
- Wan2GP: CUDA out of memory