LLM GPU VRAM Calculator

Estimate GPU memory needed to run or fine-tune an LLM by parameter count, precision (FP16, 8-bit, 4-bit), context length and LoRA vs full training.

🔒 Processed locally in your browser — we don’t upload your input.

How to use the GPU VRAM Calculator

Before downloading a 7B, 13B or 70B model, the first question is whether it will fit on your GPU. This calculator estimates the video memory required from the number of parameters and the precision of the weights. At FP16 or BF16 each parameter takes 2 bytes, at 8-bit about 1 byte and at 4-bit quantisation (GGUF Q4, GPTQ, AWQ) roughly half a byte, plus a small overhead for quantisation scales.

For inference the tool adds the KV cache, which grows with context length, batch size and model size, using layer count and hidden size estimates you can override. For training it adds gradients and optimizer states: full fine-tuning with Adam needs roughly 16 bytes per parameter in mixed precision, while LoRA and QLoRA train only a small fraction of parameters, which is why a 7B model can be fine-tuned on a single consumer GPU. Activation memory is approximated and a configurable overhead covers the CUDA context and fragmentation.

Results are estimates meant for planning, so leave headroom of 10–20%. They are useful when choosing between cloud GPU types, deciding on a quantisation level, or explaining hardware needs to a client. All calculation runs in your browser.

Frequently asked questions

How much VRAM does a 7B model need?

About 14–15 GB at FP16, around 8 GB at 8-bit and about 4–5 GB at 4-bit for weights, plus KV cache.

Why does context length matter?

The KV cache stores attention keys and values for every token, so longer contexts use more memory.

Is LoRA much cheaper than full fine-tuning?

Yes, LoRA only trains small adapter matrices, so gradients and optimizer states are tiny.

Are results exact?

No, they are planning estimates. Real usage varies by framework and settings.

About this tool

Estimate GPU memory needed to run or fine-tune an LLM by parameter count, precision (FP16, 8-bit, 4-bit), context length and LoRA vs full training. People also look for: vram calculator, llm gpu memory, how much vram for llm, gpu memory calculator.

Related searches