LLM VRAM Calculator

Calculate VRAM requirements for any LLM including model weights, KV cache, and overhead.

๐Ÿ“Š Model Specifications

๐Ÿ“ˆ VRAM Breakdown

Model Weights1.3 GB
KV Cache (1ร— batch)0.7 GB
Overhead (~10%)0.1 GB
Total VRAM Required2.2 GB
H100 GPUs Needed (80 GB)1

๐Ÿ’ก Tips

  • Use 4-bit quantization to reduce VRAM by 75%
  • KV cache grows linearly with context length and batch size
  • For inference, 4-bit is usually sufficient
  • For training, 16-bit or 32-bit is recommended

๐Ÿ“ Formula

VRAM = weights + KV cache + overhead
Weights = P ร— Q / 8
KV cache = B ร— L ร— P ร— 2 ร— Q / 8
Where: P=parameters, Q=bits, B=batch, L=context