vLLM Memory Calculator
Estimate the GPU VRAM and concurrent requests your model needs in vLLM - free, online, no sign-up.
This vLLM memory calculator works out how much GPU VRAM a model needs in vLLM, how much is left for the KV cache, and how many requests it can serve at once. Think of it as an LLM VRAM and concurrency calculator built around the numbers vLLM itself prints at startup. Pick a model and a GPU below and the result updates as you type. It is free, and nothing you enter leaves your browser.
Model architecture (edit for any other model)
From the model's config.json: num_hidden_layers, num_key_value_heads and head_dim (or hidden_size / num_attention_heads).
Advanced
Overhead covers activations, CUDA graphs and the CUDA context. vLLM measures the real figure at startup and logs it. Max concurrent sequences is --max-num-seqs.
- Weights
- Overhead
- KV cache
- Left unused
- Model weights
- KV cache per token
- KV cache per request at max length
- vLLM budget per GPU
- KV cache space
- VRAM needed for one full-length request
Estimates from the model architecture, not a measurement. vLLM profiles real activation memory at startup, so the KV cache figure in its log can differ by a gigabyte or two. Nothing you enter is saved or sent anywhere.
Why use this vLLM memory calculator
Sized the way vLLM sizes it
Utilization budget first, then weights, then overhead, with the rest going to the KV cache. The same order vLLM follows when it starts.
Concurrency, not just a yes or no
A model that loads can still queue every second request. See how many users fit at your real request length before you pick an instance.
A vllm serve command to copy
Tensor parallel size, max model length, utilization and dtype flags, filled in from what you picked.
How to calculate vLLM memory and concurrency
- Pick a model. Choose a preset, or open Model architecture and enter the parameter count, layers, KV heads and head dim from any model's config.json.
- Set the precision. BF16 for the original checkpoint, FP8 or INT8 for 8-bit weights, INT4 for an AWQ or GPTQ checkpoint. Set the KV cache dtype to fp8 if you pass --kv-cache-dtype fp8.
- Choose the GPU and how many. Pick the card your instance runs, or enter VRAM by hand. More than one GPU means tensor parallelism, which splits the weights and the KV cache across cards.
- Enter the context length. Max model length is the longest request vLLM will accept (--max-model-len). Typical request is the prompt plus output your traffic actually sends.
- Read the result. See whether the model loads, how much KV cache is left, how many requests run at once, and the vllm serve command that matches.
The vLLM GPU memory formula
vLLM splits each GPU's memory in a fixed order, and the calculator follows it:
- Budget = VRAM x
gpu_memory_utilization(0.9 unless you change it). The rest of the card is left alone. - Weights = parameters x bytes per weight: 2 for BF16, 1 for FP8, about 0.56 for INT4 including its scales. Divided by the tensor-parallel size.
- Overhead = activations, CUDA graphs and the CUDA context, measured by vLLM at startup. Usually 1 to 3 GiB per GPU.
- KV cache = whatever is left. Each token costs 2 x layers x KV heads x head dim x bytes per value.
KV cache tokens divided by the max model length gives the "Maximum concurrency" figure vLLM logs. Divided by your typical request length, it gives the number of requests you can actually run side by side.
Common vLLM memory problems and fixes
- "larger than the maximum number of tokens that can be stored in KV cache" or "larger than the available KV cache memory": vLLM needs room for at least one request at the max model length, and without
--max-model-lenit uses the model's full context (131,072 tokens for Llama 3.1). Lower--max-model-lento the number the calculator shows, raise--gpu-memory-utilization, or add a GPU. - "No available memory for the cache blocks": the weights plus overhead already fill the utilization budget. Use a lower weight precision, more GPUs with
--tensor-parallel-size, or a larger card. - CUDA out of memory while loading: usually another process holds GPU memory (a second vLLM server, a notebook, a stuck container). Check
nvidia-smi. Two servers on one card each need a utilization that adds up to under 1. - Requests queue or get preempted under load: the KV cache is full. vLLM pauses sequences and recomputes them later, which shows up as latency spikes. Add KV room with an FP8 KV cache, a smaller max model length, or more GPUs.
- The INT4 model is bigger than a quarter of BF16: AWQ and GPTQ keep group scales, and the embeddings and output layer often stay in 16-bit, so 4.5 bits per weight is more realistic than 4.
- Plenty of VRAM but low throughput across GPUs: tensor parallelism over PCIe without NVLink spends a lot of time on communication. If the model fits on one card, two separate replicas often beat one server with
--tensor-parallel-size 2.
Once you know the GPU, the GPU cost comparison for LLM inference on AWS and GCP puts a price on it, and the vLLM on AWS developer guide walks through launching it. To skip the setup, the vLLM server on the Meetrix store comes ready on AWS and GCP GPU instances. Have a GGUF or safetensors file rather than a model name? The GGUF viewer reads its layers, KV heads and parameter count and sends them here. To see how many tokens your real prompts use, and so what to set as the typical request, paste them into the LLM token counter. Formatting the JSON your OpenAI-compatible endpoint returns? Use the JSON formatter. You can also turn recordings into text with the audio to text tool, or summarize them with AI meeting notes, or browse all Meetrix features.
Frequently Asked Questions
Is this vLLM memory calculator free?
Yes. It is free, needs no sign-up, and has no limit on how many configurations you try.
Is anything I enter sent or saved?
No. The calculator is plain arithmetic that runs in your browser. Your model, GPU and settings are not saved or sent to Meetrix or anyone else. The page records anonymous usage events (that the calculator was used, or the command was copied), not the values you typed.
How much GPU memory does vLLM need for Llama 3.1 8B?
The BF16 weights take about 15 GiB, and every token of context costs 128 KiB of KV cache. On a 24 GB L4 or A10G at the default 0.9 utilization that leaves roughly 3.3 GiB of KV cache, about 27,000 tokens: fine for a 16k context, but not for the full 131,072 tokens vLLM tries by default. On a 48 GB L40S the same model has room for about 190,000 tokens, or nearly 6 requests at 32k context.
How much GPU memory does vLLM need for a 70B model?
Llama 3.3 70B in BF16 is about 131 GiB of weights, so it needs at least two 80 GB GPUs, and on two H100s only about 25,000 tokens of KV cache are left. Four H100s give about 480,000 tokens. FP8 weights on two H100s leave about 240,000 tokens, and an INT4 (AWQ) build fits on one 80 GB card with about 100,000 tokens.
What does gpu_memory_utilization do in vLLM?
It is the share of each GPU's total memory that vLLM may use, 0.9 by default. vLLM loads the weights, measures its activation memory, and turns everything else inside that share into KV cache. It does not mean vLLM uses only what the model needs: a small model still claims 90% of the card, which is why two vLLM servers on one GPU each need a lower value.
How is the vLLM KV cache size calculated?
KV cache per token = 2 x layers x KV heads x head dim x bytes per value. The 2 is one key and one value. For Llama 3.1 8B that is 2 x 32 x 8 x 128 x 2 bytes = 128 KiB per token, so a single 32k-token request holds 4 GiB of KV cache. Models with grouped-query attention (fewer KV heads than attention heads) need far less than the parameter count suggests.
How many concurrent requests can vLLM handle?
As many as fit in the KV cache, up to --max-num-seqs (256 by default on most GPUs). Divide the KV cache tokens by the tokens a typical request uses. vLLM prints the worst case at startup as "Maximum concurrency for N tokens per request", which assumes every request uses the full max model length. Real traffic is usually shorter, so more requests fit.
Does an FP8 KV cache halve memory use?
It halves the KV cache, not the model. --kv-cache-dtype fp8 stores keys and values in one byte instead of two, so the same free memory holds twice as many tokens. The weights are unchanged. On recent GPUs (Ada, Hopper and newer) the quality cost is usually small, but check it on your own prompts.
Does AWQ or GPTQ quantization reduce the KV cache?
No. INT4 weight quantization shrinks the weights to roughly a quarter of BF16, which frees memory for KV cache, but each token's KV cache is still stored in BF16 unless you also set an FP8 KV cache dtype.
Does tensor parallelism split the KV cache across GPUs?
Yes. With --tensor-parallel-size each GPU holds its share of the weights and its share of the KV heads, so both the weights and the KV cache are split. If you use more GPUs than the model has KV heads, vLLM copies heads instead of splitting them, and the calculator accounts for that.
How much memory does a mixture-of-experts model need in vLLM?
All of it. Mixtral 8x7B and Llama 4 Scout only activate some experts per token, but every expert has to sit in GPU memory, so size by the total parameter count (47B and 109B), not the active count. The KV cache follows the attention layers, which are the same as a dense model of similar shape.
How accurate is this calculator?
The weights and KV-cache-per-token figures come straight from the architecture and are close to exact. The part that varies is runtime overhead: activations, CUDA graphs and the CUDA context, which vLLM measures at startup. The calculator assumes 2 GiB per GPU, which you can change under Advanced. Expect vLLM's logged KV cache size to land within a gigabyte or two of the estimate.
Run open source tools on your own cloud
Meetrix Store has pre-configured images for Jitsi Meet, Coturn, RustDesk, OpenVPN and 40+ more open source tools, ready to launch on AWS or Google Cloud in minutes.