induwara.lk
induwara.lkAI · Local LLMs

GGUF Quantization Size Calculator

Estimate the on-disk size of any LLM in GGUF format — pick a parameter count and quant type (Q2_K to Q8_0, the IQ-quants, or F16) to see the file size, bits-per-weight, and which one fits your RAM or VRAM before you download. Formulas and measured sizes cited below.

By Induwara AshinsanaUpdated Jul 5, 2026
GGUF quantization sizes
llama.cpp verified
Model size (parameters)

Example: Llama-3.1-8B · ~8.03B parameters

Only affects the rough KV-cache estimate, not the file size.

Q4_K_M file size
4.52 GB
Bits per weight
4.5
Size vs F16
28.13%
≈ RAM incl. KV cache
8.81 GB
+4.29 GB KV (upper bound)

Quality: Balanced quality and size — the recommended default.

8GB GPU fits12GB GPU fits16GB GPU fits24GB GPU fits

Fit checks the weights plus a small runtime buffer. For exact runtime VRAM (KV cache, batch, CUDA overhead), use the LLM VRAM calculator.

All quantizations, smallest to largest

QuantbpwEst. sizevs F16
IQ1_S
I-quant (imatrix)
1.561.57 GB9.75%
IQ1_M
I-quant (imatrix)
1.751.76 GB10.94%
IQ2_XXS
I-quant (imatrix)
2.062.07 GB12.88%
IQ2_XS
I-quant (imatrix)
2.312.32 GB14.44%
IQ2_S
I-quant (imatrix)
2.52.51 GB15.63%
Q2_K
K-quant
2.6252.63 GB16.41%
IQ2_M
I-quant (imatrix)
2.72.71 GB16.88%
IQ3_XXS
I-quant (imatrix)
3.063.07 GB19.13%
Q3_K_S
K-quant
3.43753.45 GB21.48%
Q3_K_M
K-quant
3.43753.45 GB21.48%
Q3_K_L
K-quant
3.43753.45 GB21.48%
IQ3_S
I-quant (imatrix)
3.443.45 GB21.5%
IQ3_M
I-quant (imatrix)
3.663.67 GB22.88%
IQ4_XS
I-quant (imatrix)
4.254.27 GB26.56%
Q4_0
Legacy
4.54.52 GB28.13%
Q4_K_S
K-quant
4.54.52 GB28.13%
Q4_K_M★ pick
K-quant
4.54.52 GB28.13%
IQ4_NL
I-quant (imatrix)
4.54.52 GB28.13%
Q4_1
Legacy
55.02 GB31.25%
Q5_0
Legacy
5.55.52 GB34.38%
Q5_K_S
K-quant
5.55.52 GB34.38%
Q5_K_M★ pick
K-quant
5.55.52 GB34.38%
Q5_1
Legacy
66.02 GB37.5%
Q6_K★ pick
K-quant
6.56256.59 GB41.02%
Q8_0
Legacy
8.58.53 GB53.13%
F16
Float
1616.1 GB100%

Real GGUF files run roughly 5–15% away from the pure-weight estimate because token-embedding and output tensors are often kept at higher precision. The “7B measured” column shows llama.cpp's actual LLaMA-7B sizes so you can see the real-world spread.

Bits-per-weight and quality labels from· disk sizes are decimal GB (÷ 1e9), as shown on Hugging Face and Ollama.

How it works

GGUF is the model file format used by llama.cpp, Ollama, LM Studio, and koboldcpp. Every model ships in several quantizations — the same weights stored at different precision, from 16-bit floats down to under two bits each. Fewer bits means a smaller file and less memory, at some cost to quality. This calculator turns a parameter count and a quant type into an estimated file size so you can pick the smallest quant that still fits comfortably.

The estimate is a three-step calculation:

  1. Weight size. Each quant has a nominal bits-per-weight (bpw). File size ≈ parameters × bpw ÷ 8, reported in decimal GB (÷ 1e9) to match Hugging Face and Ollama download sizes.
  2. Bits-per-weight. K-quant values come straight from the ggml block layout — Q4_K packs 256 weights into a 144-byte super-block, so 144 × 8 ÷ 256 = 4.5 bpw. Likewise Q6_K = 6.5625, Q5_K = 5.5, Q3_K = 3.4375, Q2_K = 2.625. I-quant values (IQ1–IQ4) come from the Hugging Face GGUF reference.
  3. Relative size. size vs F16 = bpw ÷ 16 × 100%. A Q4_K_M model is about 28% of the F16 file; Q8_0 is about 53%.

Real GGUF files run roughly 5–15% away from the pure-weight estimate. Token-embedding and output tensors are usually kept at higher precision, and K-quant “mixes” (the _S / _M / _L suffixes) shift which layers use larger blocks. To keep the tool honest, each quant is shown next to llama.cpp's measuredLLaMA-7B (6.74B) file size from Discussion #2094:

QuantbpwEstimate (7B)Measured (7B)Delta
Q2_K2.6252.21 GB2.67 GB-17.2%
Q3_K_S3.43752.90 GB2.75 GB+5.3%
Q3_K_M3.43752.90 GB3.07 GB-5.7%
Q3_K_L3.43752.90 GB3.35 GB-13.5%
Q4_04.53.79 GB3.50 GB+8.3%
Q4_K_S4.53.79 GB3.56 GB+6.5%
Q4_K_M4.53.79 GB3.80 GB-0.2%
Q4_154.21 GB3.90 GB+8.0%
Q5_05.54.63 GB4.30 GB+7.8%
Q5_K_S5.54.63 GB4.33 GB+7.0%
Q5_K_M5.54.63 GB4.45 GB+4.1%
Q5_165.05 GB4.70 GB+7.6%
Q6_K6.56255.53 GB5.15 GB+7.4%
Q8_08.57.16 GB6.70 GB+6.9%
F161613.48 GB13.00 GB+3.7%

The estimate and the measured size agree closely for the mid-range quants people actually use — Q4_K_M is within a fraction of a percent — and drift most at the extremes, where the fixed embedding/output overhead is a bigger share of a small model. For large models the two converge, because that overhead becomes a rounding error.

Worked examples

Llama-3.1-8B at Q4_K_M

  1. Parameters: 8.03B, bits-per-weight: 4.5
  2. File size: 8.03e9 × 4.5 ÷ 8 = 4.517e9 bytes
  3. = 4.52 GB (pure-weight estimate)
  4. Real bartowski GGUF ≈ 4.9 GB (~8% higher)
  5. Size vs F16: 4.5 ÷ 16 = 28.1%
  6. Fits an 8 GB GPU comfortably.

Llama-3.3-70B — Q4_K_M vs Q2_K

  1. Parameters: 70.6B
  2. Q4_K_M: 70.6e9 × 4.5 ÷ 8 = 39.7 GB
  3. Q2_K: 70.6e9 × 2.625 ÷ 8 = 23.2 GB
  4. A 24 GB GPU can hold Q2_K (23 GB) but not Q4_K_M (40 GB)
  5. So on 24 GB VRAM, Q2_K is the largest 70B quant that fits.

Edge case — 405B at F16 vs IQ1_S

  1. Parameters: 405B (Llama-3.1-405B)
  2. F16: 405e9 × 16 ÷ 8 = 810 GB
  3. IQ1_S: 405e9 × 1.56 ÷ 8 = 78.98 GB
  4. Even the smallest 1-bit quant needs ~79 GB of storage
  5. — multi-GPU or heavy offload territory either way.

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.