Skip to content
All calculators

LLM VRAM Calculator: GPU Memory to Run a Model

Estimate the GPU memory a language model needs for your context length and concurrent users.

Model and workload

Model and GPU

Requests

Input and output tokens per request.

Count one active request per user.

Precision
Weight precision
Cache precision
Model architecture

For inference only. Fine-tuning and training have separate memory requirements.

Estimated VRAM

39.15 GB

Model weights
29.4 GB
KV cache
3.22 GB
Overhead allowance
6.52 GB
Selected GPUs needed
2
Single-GPU fit
GPU capacityFit
GeForce RTX 4080 (16 GB)Too small
GeForce RTX 4090 (24 GB)Too small
GeForce RTX 5090 (32 GB)Too small
NVIDIA L40S (48 GB)Fits

GPU count assumes the serving software can split memory evenly across cards.

How the VRAM Estimate is Calculated

The estimate adds the memory for the model weights, the key-value (KV) cache and an allowance for the serving software. The calculator uses decimal gigabytes, where 1 GB is one billion bytes.

Multiply the parameter count by the bytes per parameter to estimate weight memory. Use 2 bytes at 16-bit, 1 byte at 8-bit or half a byte at 4-bit. Actual checkpoints can take more space if some layers use higher precision or the format stores scaling data alongside the weights.

The KV cache stores attention data for tokens the model has already processed. Multiply the number of attention layers by the KV heads per layer, the head size and the bytes per cache value. Multiply that by two to store both keys and values, then by the context length and concurrent users. The calculator assumes one full-length cache per active request, including input and output tokens. For grouped-query attention, enter the KV head count from the model configuration.

The calculator adds 20% to the combined weights and cache for activations and serving overhead, including temporary buffers. The allowance is a planning estimate. Use a context length supported by your model and serving configuration. Memory can rise with batching or when the server reserves cache blocks in advance.

The fit check compares the estimate in bytes with the total graphics memory reported for each GPU. The GPU labels show their advertised capacities. To estimate the GPU count, the calculator divides by the reported total for the selected card and rounds up. Drivers and other processes can leave less memory free on your machine. Check that your serving software can split the model across those cards, then measure peak memory under your expected load.

Worked Example: A Mid-Sized Model for a Small Team

Suppose two people have active requests on Qwen2.5 14B Instruct, each with 8,192 tokens of context. The model has 14.7 billion parameters, 48 layers and 8 KV heads of 128 values each. Both estimates use a 16-bit KV cache.

Memory16-bit weights4-bit weights
Weights29.4 GB7.35 GB
KV cache3.22 GB3.22 GB
Overhead6.52 GB2.11 GB
Total39.15 GB12.69 GB

At 16-bit the example fits on one 48 GB L40S by capacity. The 32 GB RTX 5090, 24 GB RTX 4090 and 16 GB RTX 4080 each fit the 4-bit estimate, as does the L40S. Those figures compare memory only. If the card is close to the estimate, run the quantised checkpoint with the actual serving software and check how much memory is free at peak use.

Quantisation and Its Trade-Offs

For the weights alone, 8-bit uses half the raw memory of 16-bit and 4-bit uses a quarter. The KV cache stays the same size when you change only the weight precision. Quantisation rounds weight values to fewer levels, so the checkpoint can give different answers. At 4-bit, a model that handles routine questions well can still struggle on the tasks where small errors matter.

Before committing to a quantised checkpoint, compare its answers with the 16-bit model on your own prompts. Include long inputs and the cases where your team would reject an incorrect answer. Measure peak memory at your target concurrency during the same test.

When a Hosted Model Makes More Sense

A managed model endpoint in an Australian cloud region can make sense when demand is intermittent or your team has limited time to run a model server. With usage-based billing you pay for requests as they come in. A local server costs money to buy or rent and your team handles updates, monitoring and failures. With steady demand, compare the full cost of keeping that server running against the hosted bill at your expected usage.

Running locally lets your team control where requests and logs are stored. For a hosted model, check the endpoint’s routing and retention terms. A regional endpoint can use a routing profile that sends inference requests to other regions. The data sovereignty guide covers what to check about processing and storage.

Use the local LLM guide to match a model to your hardware. The open-source LLM guide compares models with downloadable weights.