Estimate the GPU VRAM required to run local LLMs like Llama 3, Mistral, Mixtral, Gemma 2, and Qwen2 at FP16, INT8, or INT4 quantization, including KV cache overhead, and get a recommended GPU tier for your setup.
Enter your details and click Calculate to see results
Running a large language model locally requires enough GPU VRAM to hold both the model's weights and the working memory it needs during inference. Get this wrong and the model either won't load at all or will run painfully slowly by offloading to system RAM. This calculator estimates total VRAM requirements for popular open models — Llama 3, Llama 3.1, Mistral, Mixtral, Gemma 2, Qwen2, and Phi-3 — at different quantization levels, and maps the result to a recommended consumer or data-center GPU tier.
Select a preset model (or enter a custom parameter count), choose a quantization level (FP16/BF16, INT8, or INT4), and set your expected context length and batch size. The calculator computes base VRAM as parameter count (in billions) × bytes per parameter for the chosen quantization × a 1.2 overhead factor that accounts for CUDA kernels, activation buffers, and memory fragmentation beyond the raw weights. It then estimates KV cache size — the memory used to store attention keys and values for every token in context — using the approximation params(B) × 0.00025 × (context/1000) × batch size, and adds base VRAM plus KV cache for a total, which it maps to a recommended GPU tier from RTX 4060 up to multi-GPU/cloud clusters.
Quantization is the single biggest lever for fitting a large model onto affordable hardware — dropping from FP16 to INT4 cuts memory needs by roughly 4x, often the difference between needing a multi-GPU cluster and running comfortably on a single consumer card, at some cost to output quality depending on the quantization method. KV cache is easy to overlook but becomes a major factor for long-context or high-concurrency serving, since it scales with both context length and batch size — a model that fits comfortably for single-user chat may run out of memory serving many concurrent long-context requests.
FP32 uses 4 bytes/parameter, FP16/BF16 uses 2 bytes, INT8 uses 1 byte, and INT4 uses 0.5 bytes. Lower precision means less memory but potentially reduced output quality — INT8 and well-tuned INT4 are usually good tradeoffs.
KV cache memory grows with both context length and batch size. Long-context or high-concurrency serving can require far more VRAM for KV cache than for the model weights themselves — always factor it into capacity planning.
Consumer cards (RTX 4060–4090) suit smaller quantized models; data-center cards (A100, H100 80GB) suit large models at higher precision. Multi-GPU setups or cloud rental become necessary once a single card's VRAM is exceeded.
Common questions about VRAM and local LLM hosting
Explore other AI & infrastructure tools