How much VRAM does a 7B quantized model need?

Weights in GB are roughly the parameter count in billions times the quant's bits per weight, divided by 8. A 7B model at Q4_K_M (4.8 bits/weight) is about 4.2 GB of weights; add around 1.5 GB of context and runtime overhead and it fits an 8 GB card.

The formula

weights_GB = params_in_billions x bits_per_weight / 8

Each quantization packs weights at a different average size. The bits-per-weight figures below are the same ones our calculator uses.

A 7B model, worked out

QuantBits / weight7B weightsWith ~1.5 GB overhead
Q4_K_M4.84.20 GB5.70 GB - fits 8 GB
Q5_K_M5.74.99 GB6.49 GB - fits 8 GB
Q8_08.57.44 GB8.94 GB - needs more than 8 GB
FP161614.00 GB15.50 GB - needs 16 GB+

The overhead row matters. KV cache, compute buffers and the runtime add GBs on top of the weights, and it grows with context length. 1.5 GB is a modest allowance; long contexts need more.

Do the math with your own numbers:

GGUF Quant VRAM Calculator →

Free, runs in your browser. Nothing you type is sent anywhere.

Advertisement