Quantization stores a model's numbers in fewer bits than the usual 16. Weights then take less memory and move faster, so large checkpoints fit consumer cards. GGUF versus FP8 in ComfyUI covers file choice.
Where did quantization come from?
The FP8 formats paper defined two float encodings for 2022 hardware. LLM.int8() showed that a 175B model runs in eight bits at half the memory, keeping rare outlier features precise.
GPTQ pushed weights to 3 or 4 bits after training. AWQ protected the 1% of salient channels. QLoRA added the NF4 data type. A 65B model could then be fine-tuned on one 48GB card.
How do fewer bits shrink a model?
Weight quantization rounds each weight to a small grid, with a scale per block.
The llama.cpp tool writes GGUF files. Measured on Llama 8B:
| format | bits per weight | gibibytes |
|---|---|---|
| F16 | 16.00 | 14.96 |
| Q8_0 | 8.50 | 7.95 |
| Q4_K_M | 4.89 | 4.58 |
| Q2_K | 3.16 | 2.95 |
NVFP4 also quantizes activations, using fine scales.
How does it apply to image and video models?
The ComfyUI-GGUF README notes that conv2d U-Nets resisted quantization, while DiT models such as FLUX lose less. See the DiT page.
SVDQuant moves outliers into a small low-rank branch. On FLUX.1 it cut memory 3.5x. Its Nunchaku engine ran 3.0x faster than 4-bit weight-only on a laptop card.
What does it cost?
Quantization error grows as bits fall. A LoRA trained on a full-precision base may behave differently on a quantized checkpoint.
KIVI extends quantization to the KV cache. bitsandbytes adds 8-bit layers to PyTorch, and optimizers use 8-bit states.
Sources
- LLM.int8(), GPTQ, AWQ: abstracts for the original LLM methods.
- SVDQuant, QLoRA: 4-bit image-model results and the NF4 type.
- FP8 formats, llama.cpp quantize README: float encodings and GGUF file sizes.