LLM VRAM & Quantization Calculator

Calculate the required GPU VRAM for large language models based on model parameters, quantization bits, and context length.

0.0 GB

How It Works / Formula

Total GPU VRAM combines model weights (plus ~5% quantization metadata overhead), KV-cache memory scaled by context length, and ~0.5 GB CUDA/runtime overhead:

Total VRAM (GB) = (Parameters_B × Bits ÷ 8 × 1.05) + (Parameters_B × Context ÷ 4096 × 0.25) + 0.5

Example 1 (8B Model — Llama 3 / Qwen at Q4, 8K Context)

Model Parameters: 8B, Quantization: Q4 (4-bit), Context Length: 8192 → 5.20 GB VRAM (fits an 8 GB GPU)

Example 2 (32B Model — Qwen / DeepSeek at Q4, 8K Context)

Model Parameters: 32B, Quantization: Q4 (4-bit), Context Length: 8192 → 18.90 GB VRAM (fits a 24 GB RTX 3090/4090)

Example 3 (70B Model at Q4, 8K Context)

Model Parameters: 70B, Quantization: Q4 (4-bit), Context Length: 8192 → 40.75 GB VRAM (fits dual 24 GB GPUs or 48 GB workstation card)