How the LLM VRAM calculator works
The calculator above estimates the memory needed to serve a dense language model for inference. It adds three parts and prints each one, so you can see which part dominates. Weights are the parameter count times the bytes per value at the precision you pick. The KV cache is the memory the attention layers keep for every token of every sequence in flight. Runtime is a flat 2 GB per GPU for the CUDA context, the framework and activation workspace.
The total line under the form shows weights plus KV cache plus one 2 GB runtime allowance. The GPU table then does the sizing. For each GPU it tries 1, 2, 4 and 8 GPUs and picks the first count where the weights and KV cache, split evenly across the GPUs, plus 2 GB of runtime on each GPU, fit inside 90% of that GPU's memory. If even 8 GPUs are not enough, the table says "More than 8".
Every input is visible. Choosing a preset fills in parameters, layers, KV heads and head dimension from the model's published configuration. Editing any of those four fields switches the model to "Custom model", so you can size a model that is not on the list. For the background on why memory runs out, read LLM VRAM requirements.
| Input | What it means | Default |
|---|---|---|
| Parameters (billions) | Total weights in the model | 70.6 (Llama 3.3 70B) |
| Weight precision | FP32 4 bytes, BF16/FP16 2, FP8/INT8 1, 4-bit 0.5 | BF16 |
| KV cache precision | Same four options, set separately | BF16 |
| Context length | Prompt plus output tokens per sequence | 8,192 |
| Concurrent sequences | Requests held in memory at once | 8 |
| Layers, KV heads, head dimension | Attention shape from the model config | 80, 8, 128 |
Weights: parameters times bytes per value
Weight memory is the simplest part: parameters in billions times bytes per value gives gigabytes. A 70.6-billion-parameter model takes 141.2 GB in BF16, 70.6 GB in FP8 and 35.3 GB at 4 bits. The calculator uses decimal gigabytes (one billion bytes), the same unit GPU makers use for memory capacity.
The 4-bit option assumes exactly half a byte per weight. Real 4-bit formats such as AWQ and GPTQ also store scales and zero points for each group of weights, and some layers often stay in higher precision, so a real 4-bit checkpoint is somewhat larger than the estimate. Check the file sizes of the checkpoint you will load.
Precision also depends on the hardware. vLLM's documentation says FP8 computation needs NVIDIA compute capability 8.9 or higher (Ada Lovelace, Hopper, Blackwell), while Turing and Ampere GPUs run FP8 checkpoints as weight-only W8A16 through Marlin kernels. The memory saving holds on both, but speed differs. The trade-offs between formats are covered in LLM quantization for inference.
References: vLLM documentation: FP8 W8A8
KV cache: the part that grows with traffic
The calculator computes the KV cache as 2 × layers × KV heads × head dimension × bytes × context length × concurrent sequences. The 2 counts one key and one value vector per layer. Modern models use grouped-query attention, so the KV head count is much smaller than the attention head count: Llama 3 70B has 64 attention heads but only 8 key/value heads, which cuts the cache eight-fold.
Because context and sequences multiply, the KV cache is what changes when your traffic changes. Doubling either one doubles the cache. The weights stay fixed. Setting the KV cache to FP8 halves it; vLLM supports fp8_e4m3 and fp8_e5m2 cache formats and recommends calibrated scales for the best accuracy.
The table shows the presets with their configuration and the KV cache each token costs in BF16. Multiply the last column by context length and sequence count to get the cache size. Parameter counts match the totals listed on each model's Hugging Face page.
| Preset | Parameters | Layers | KV heads | Head dim | KV per token, BF16 |
|---|---|---|---|---|---|
| Llama 3.1 8B | 8.0B | 32 | 8 | 128 | 0.131 MB |
| Mistral 7B | 7.2B | 32 | 8 | 128 | 0.131 MB |
| Qwen3 14B | 14.8B | 40 | 8 | 128 | 0.164 MB |
| Qwen3 32B | 32.8B | 64 | 8 | 128 | 0.262 MB |
| Llama 3.3 70B | 70.6B | 80 | 8 | 128 | 0.328 MB |
| Llama 3.1 405B | 405B | 126 | 8 | 128 | 0.516 MB |
References: The Llama 3 Herd of Models (arXiv 2407.21783), Table 3 · Llama 3.3 70B Instruct model card, Hugging Face · Mistral 7B Instruct v0.3 model card, Hugging Face · Qwen3 32B model card, Hugging Face · vLLM documentation: quantized KV cache
Worked example: Llama 3.3 70B in BF16, FP8 and 4-bit
Take Llama 3.3 70B at 8,192 tokens of context and 8 concurrent sequences, the calculator's default. The KV cache is 2 × 80 × 8 × 128 × 2 bytes × 8,192 × 8 = 21.5 GB in BF16, or 10.7 GB in FP8. Add the weights and one 2 GB runtime allowance for the total.
Now size an H100 80 GB. Ninety percent of 80 GB leaves 72 GB usable. In BF16, 162.7 GB of weights and cache split over 2 GPUs is 81.3 GB each, plus 2 GB runtime, which does not fit, so the answer is 4 H100s. With FP8 weights and BF16 cache, 92.1 GB over 2 GPUs is 46.0 GB plus 2 GB, which fits on 2. With 4-bit weights, 56.8 GB plus 2 GB fits on one H100.
The same arithmetic gives the other rows. A H200 with 141 GB holds the FP8 version on one GPU, and FP8 for both weights and cache brings the L40S down from 4 GPUs to 2. Run these cases yourself by changing the two precision menus.
| Weights / KV cache | Weights | KV cache | Total | H100 80GB | H200 141GB | L40S 48GB | RTX PRO 6000 96GB |
|---|---|---|---|---|---|---|---|
| BF16 / BF16 | 141.2 GB | 21.5 GB | 164.7 GB | 4 | 2 | 4 | 2 |
| FP8 / BF16 | 70.6 GB | 21.5 GB | 94.1 GB | 2 | 1 | 4 | 2 |
| FP8 / FP8 | 70.6 GB | 10.7 GB | 83.3 GB | 2 | 1 | 2 | 1 |
| 4-bit / BF16 | 35.3 GB | 21.5 GB | 58.8 GB | 1 | 1 | 2 | 1 |
References: The Llama 3 Herd of Models (arXiv 2407.21783), Table 3
How to read the GPU table
Each row is a GPU NeuraMesh rents, with its memory and the smallest group that fits. The number is a memory answer, not a speed answer. It assumes tensor parallelism, which splits every layer's weights and KV cache across the group, so each GPU carries a share plus its own 2 GB runtime. That is why the table can need more GPUs than the total line divided by GPU memory suggests.
Read three things into a result. First, a group of 4 or 8 GPUs talks on every layer, so the link between them matters: NVLink systems scale better than GPUs that only share PCIe. Second, a count of 8 on a 24 GB card means the model technically fits, not that it will be fast or cheap. Third, "More than 8" means you need a smaller precision, a shorter context, fewer sequences, or pipeline parallelism across servers.
Sizes are rounded to one decimal place on the page. Small changes in the inputs can tip a result from 2 GPUs to 4, so test the edges: if 2 GPUs only fit at 8 sequences, plan for traffic growth before you commit.
What the calculator leaves out
The estimate is for serving a dense, text-only model. Training needs far more: gradients, optimizer states and stored activations can be several times the weight memory, so use LoRA fine-tuning cost for fine-tuning plans instead. Mixture-of-experts models must hold every expert in memory, so enter the total parameter count, not the active one, and check the attention design; some use compressed KV schemes the formula does not model.
Vision-language models add an image encoder and image tokens that the presets do not include. Speculative decoding adds a draft model. Long-context features such as sliding-window attention can use less KV cache than the formula assumes, while prefix caching keeps extra blocks around.
Framework overhead also varies. The flat 2 GB per GPU is a planning allowance; CUDA graphs, large batch workspaces and different attention kernels can use more. vLLM also pre-allocates memory: its engine arguments documentation, read on 24 November 2026, says that if --gpu-memory-utilization is unspecified it uses 1.0 with the extensible KV cache and 0.92 otherwise, so a running server can look almost full in nvidia-smi even when the model is small.
References: vLLM documentation: engine arguments · NVIDIA System Management Interface
Verify the estimate on a real GPU
Treat the result as a starting point and confirm it with a short test before a long rental. Load the model in vLLM with the settings you sized for: --max-model-len for context, --max-num-seqs for concurrent sequences, --kv-cache-dtype for the cache format and --tensor-parallel-size for the GPU count. If it starts, read the engine's startup log for the KV cache space it reserved.
Then push real traffic through it. Send prompts at your expected length and concurrency and watch memory with nvidia-smi --query-gpu=memory.used,memory.total --format=csv -l 1. If the server rejects or queues requests at your target concurrency, the cache is too small. The method in benchmark LLM inference measures throughput and latency on the same run.
A one-hour test on the GPU count the calculator suggests costs little next to a month on the wrong size. Price that test and the run that follows with the GPU cost calculator.
References: vLLM documentation: engine arguments · NVIDIA System Management Interface
Checklist and next step
Pick the model preset or enter its config. Set the precision you will actually deploy. Use your real context length and peak concurrent sequences, not averages. Read the GPU count, then check the interconnect for groups of 4 or 8. Leave room for growth. Confirm with a one-hour load test before a long run.
When the size is clear, NeuraMesh rents the GPUs in the table by the hour: choose a GPU, a plan, GPU count, hours and region on rent GPUs, and you receive a confirmed quotation, typically within one business day, with nothing charged until you approve. If two options look close, ask the compute advisor.
NeuraMesh prices for these GPUs
| GPU | Memory | Data center | Value |
|---|---|---|---|
| RTX 4090 | 24 GB | $0.46 | $0.40 |
| L40S | 48 GB | $1.26 | $0.54 |
| A100 | 80 GB | $1.56 | $0.98 |
| H100 | 80 GB | $2.88 | $2.00 |
Every order is confirmed in a quotation before you pay. See all GPU prices.
Questions readers ask
How much VRAM does Llama 3.3 70B need?
About 141 GB for BF16 weights, 71 GB in FP8 and 35 GB at 4 bits, before the KV cache. At 8,192 tokens and 8 concurrent sequences, add 21.5 GB of BF16 KV cache and runtime. That is 4 H100 80 GB GPUs in BF16, 2 in FP8, or 1 at 4 bits.
How do I calculate KV cache size?
Multiply 2 × layers × KV heads × head dimension × bytes per value × context length × concurrent sequences. Take layers and KV heads from the model config (num_hidden_layers, num_key_value_heads). Head dimension is the hidden size divided by attention heads unless the config lists head_dim.
Why does the calculator keep 10% of memory free?
Memory use peaks above the steady state when batches change shape, and allocators fragment. Planning to 90% of capacity leaves room for those peaks. It is a planning margin; your serving engine has its own memory setting.
Does the LLM VRAM calculator work for training?
No. It covers inference only. Training adds gradients, optimizer states and activations, which usually need several times the weight memory. LoRA and QLoRA reduce that, but they need their own estimate.
Why do I need more GPUs than total memory divided by GPU size?
Each GPU in a tensor-parallel group carries its own runtime and must fit its share inside 90% of its memory. The calculator also only tries 1, 2, 4 or 8 GPUs, so a model that needs 2.5 GPUs of memory rounds up to 4.
Sources and editorial notes
- vLLM documentation: FP8 W8A8
- The Llama 3 Herd of Models (arXiv 2407.21783), Table 3
- Llama 3.3 70B Instruct model card, Hugging Face
- Mistral 7B Instruct v0.3 model card, Hugging Face
- Qwen3 32B model card, Hugging Face
- vLLM documentation: quantized KV cache
- vLLM documentation: engine arguments
- NVIDIA System Management Interface
Primary documentation reviewed November 24, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.
Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.


