Free Interactive ML Systems Tool

LLM VRAM, KV Cache & Quantization Calculator

Size GPU memory for Llama 3, Qwen, DeepSeek-R1/V3, and custom transformers across FP16, FP8, INT4 AWQ/GPTQ, and GGUF (Q4_K_M, Q5_K_M, Q8_0) — including KV cache scaling, hardware fit, and decode speed.

Best 4-bit production GPU serving

KV Cache Precision

FP8 KV cache halves KV VRAM on Hopper/Ada GPUs with near-zero accuracy loss.

70.6B
8K tokens
8 seqs

Estimated Total GPU Memory Required

57.3 GB VRAM

Weights: 39.7 GB
KV Cache: 10.7 GB
Activations & Overhead: 6.9 GB

GPU & Hardware Fit Matrix

HardwareCards NeededHeadroomEst. 1-User SpeedEst. Batched $/1M tok
RTX 4090
Consumer GPU
3× (72 GB)+14.7 GB~49 tok/s~$1.71
RTX 5090
Consumer GPU
2× (64 GB)+6.7 GB~59 tok/s~$1.79
NVIDIA L40S
Cloud Serving
2× (96 GB)+38.7 GB~28 tok/s~$4.89
A100 80GB SXM
Cloud Serving
1× (80 GB)+22.7 GB~33 tok/s~$3.12
H100 80GB SXM
Cloud Serving
1× (80 GB)+22.7 GB~55 tok/s~$3.16
H200 141GB
Cloud Serving
1× (141 GB)+83.7 GB~79 tok/s~$2.99
Apple Silicon (64 GB)
Local Unified (~75% usable)
2× (96 GB)+38.7 GB~13 tok/sLocal ($0 cloud)
Apple Silicon (128 GB)
Local Unified (~75% usable)
1× (96 GB)+38.7 GB~9 tok/sLocal ($0 cloud)

Speed & cost are bandwidth-bound decode approximations assuming ~65% effective HBM utilization and typical on-demand cloud GPU rates. Always benchmark your exact serving engine (vLLM / SGLang / llama.cpp).

Machine Learning at Scale Newsletter · 13k+ ML Engineers

Get weekly LLM serving & inference teardowns in your inbox

Deep dives on speculative decoding (DSpark), vLLM at LinkedIn, FP8 quantization, and cutting GPU serving bills in production — free on Substack.

Subscribe Free on Substack →

Spending $10k+/mo on GPU inference and want an independent architecture audit? Book a 1-week Focused ML Review →

Companion Production Serving Guides

Frequently Asked Questions

How much VRAM do I need to run a 70B LLM?

A 70B model needs ~140 GB for weights in FP16, ~72 GB in FP8/INT8, and ~39–42 GB in 4-bit (AWQ, GPTQ, or GGUF Q4_K_M) before adding KV cache and CUDA runtime overhead. At 4-bit with an 8K context window, it fits comfortably on a single 80 GB A100/H100 or a 64 GB+ Apple Silicon Mac.

How is LLM KV cache memory calculated?

KV cache per token equals 2 (keys and values) × number of layers × KV heads × head dimension × bytes per element (2 bytes for FP16, 1 byte for FP8). Multiply by sequence length and concurrent batch size to get total KV cache VRAM.

Does 4-bit quantization also shrink the KV cache?

No. Weight quantization (AWQ, GPTQ, GGUF Q4_K_M) compresses only the model weights. To shrink the KV cache, enable FP8/INT4 KV cache quantization and PagedAttention in vLLM or SGLang.

What is the best quantization format for local vs. cloud GPU serving?

For production cloud GPU serving (vLLM, SGLang, TensorRT-LLM), start with FP8 on H100/L40S or INT4 AWQ when VRAM-constrained. For local CPUs, Apple Silicon, or single consumer GPUs via llama.cpp/Ollama, use GGUF Q4_K_M or Q5_K_M.