LLM Quantization: how fewer bits per weight squeeze a 14 GB model onto an 8 GB GPU
What is quantization? A 7 billion parameter model stored in FP16 takes about 14 GB, which will not fit on an 8 GB GPU. Quantization stores each weight with fewer bits. It is the same model with less precision per number, so it needs less disk, less VRAM and less memory bandwidth, and it usually runs faster.
The size math:
Size in bytes is roughly params x bits / 8. A 7B model at 16 bits is 7B x 16 / 8 = 14 GB. At 4 bits it is 7B x 4 / 8 = 3.5 GB. Half a byte per weight makes it four times smaller.
GGUF quant levels:
In the GGUF format used by llama.cpp, Q8_0 is 8-bit and practically lossless, Q6_K loses very little, Q5_K_M is 5-bit, Q4_K_M is the usual sweet spot, Q3_K is 3-bit, and Q2_K clearly degrades. The "K" quants store a scale and minimum for each small block of weights, which keeps accuracy higher at low bit counts. Lower means smaller and faster.
The quality trade-off:
Fewer bits raises perplexity, which is a measure of how unsure the model is about the next token. Q4_K_M stays close to full quality. Drop to 2 bits and answers get visibly worse. An importance matrix (imatrix) measures which weights matter most on sample text and protects them, which helps a lot at 2 and 3 bits.
Runtime VRAM: The weights are only part of the bill. The KV cache, which stores attention state for every token in the context, grows with context length times the number of layers, so long chats need extra room on top of the model file. On GPUs there are newer formats too: FP8, NVFP4, MXFP4, AWQ and GPTQ.
Start with Q4_K_M as a safe default, use an imatrix quant if you must go to 2 or 3 bits, and reach for FP8 when you are running on a GPU that supports it.