LLM VRAM calculator
How much GPU memory does a model need for your context length and number of users? Pick one of the open models we track, or enter any model's size and architecture. You get the memory breakdown, every GPU it fits on, and what that GPU costs to rent today.
Which GPUs fit
| GPU | Setup | Context room per request |
|---|---|---|
| Turn on JavaScript to use the calculator. | ||
Prices are the typical (median) hourly price on the Vast.ai marketplace on 5 Dec 2026; multi-GPU servers are estimated as the single-GPU price × number of GPUs. “Context room” is how many tokens each of your concurrent requests can hold at the same time.
How the calculator works
A model being served keeps four things in GPU memory:
GPU memory ≈ weights
+ KV cache per token × context × concurrent requests
+ fixed state per request (sliding-window and linear-attention layers)
+ engine reserve
- Weights. For the models in the list we use the real size of the files the engine loads, taken from Hugging Face. For any other model it is parameters × bits per weight: 16 for BF16, about 8.5 for FP8, 4.5 for 4-bit AWQ/GPTQ and 4.85 for GGUF Q4_K_M.
- KV cache. Every token in context stores a key and a value in each attention layer: 2 × layers × KV heads × head dim × 2 bytes. A Llama-style 8B model needs 128 KB per token, so 32K tokens take about 4.3 GB. Models with sliding-window, linear or latent attention (gpt-oss, Gemma 4, Qwen3.6/3.8, DeepSeek) store much less, and the presets account for that.
- Engine reserve. vLLM uses 90% of GPU memory by default and needs about 1 GB of that for activations and CUDA graphs. With llama.cpp we keep 1.5 GB free. This is why a 24 GB card does not give you 24 GB for the model.
- Several GPUs. With tensor parallelism (
--tensor-parallel-sizein vLLM) or layer split in llama.cpp, memory adds up across GPUs and each GPU keeps its own reserve. We show 2×, 4× and 8× servers when one GPU is not enough.
The numbers are calculated, not measured, and real usage moves with the engine version, vision encoders and batch settings: keep about 10% headroom. For the reasoning behind each number and the per-model tables, see How much VRAM do you need to run an LLM?
VRAM for popular open models
| Model · format | Weights | KV per 1K tokens | Runs on one GPU (32K+ context) | Cheapest today | Context room on it |
|---|---|---|---|---|---|
| gpt-oss-20b MXFP4 (as released) · vLLM | 13.8 GB | 25 MB | RTX 3090, RTX 4090, RTX A6000, RTX 5090, RTX 6000 Ada and more | RTX 3090 · $0.22/hr | full 128K context |
| gpt-oss-120b MXFP4 (as released) · vLLM | 65.2 GB | 38 MB | A100 80GB, RTX PRO 6000, H100, H200, B200 | A100 80GB · $0.84/hr | full 128K context |
| Qwen3.8-27B BF16 · vLLM | 55.6 GB | 67 MB | A100 80GB, RTX PRO 6000, H100, H200, B200 | A100 80GB · $0.84/hr | full 256K context |
| Qwen3.8-27B FP8 (official) · vLLM | 30.9 GB | 67 MB | RTX A6000, RTX 6000 Ada, L40S, A100 80GB, RTX PRO 6000 and more | RTX A6000 · $0.48/hr | ≈212K tokens |
| Qwen3.8-27B NVFP4 · vLLM | 26.4 GB | 67 MB | RTX 5090, RTX PRO 6000, B200 | RTX 5090 · $0.67/hr | ≈46K tokens |
| Qwen3.8-27B GGUF Q4_K_M · llama.cpp | 16.6 GB | 67 MB | RTX 3090, RTX 4090, RTX A6000, RTX 5090, RTX 6000 Ada and more | RTX 3090 · $0.22/hr | ≈110K tokens |
| Gemma 4 31B BF16 · vLLM | 62.5 GB | 84 MB | A100 80GB, RTX PRO 6000, H100, H200, B200 | A100 80GB · $0.84/hr | ≈153K tokens |
| Gemma 4 31B FP8 · vLLM | 33.3 GB | 84 MB | RTX A6000, RTX 6000 Ada, L40S, A100 80GB, RTX PRO 6000 and more | RTX A6000 · $0.48/hr | ≈133K tokens |
| Gemma 4 31B 4-bit QAT (W4A16) · vLLM | 23.3 GB | 84 MB | RTX A6000, RTX 5090, RTX 6000 Ada, L40S, A100 80GB and more | RTX A6000 · $0.48/hr | ≈252K tokens |
| Gemma 4 31B GGUF Q4_0 (QAT) · llama.cpp | 17.7 GB | 84 MB | RTX 3090, RTX 4090, RTX A6000, RTX 5090, RTX 6000 Ada and more | RTX 3090 · $0.22/hr | ≈66K tokens |
| Gemma 4 26B-A4B BF16 · vLLM | 51.6 GB | 21 MB | A100 80GB, RTX PRO 6000, H100, H200, B200 | A100 80GB · $0.84/hr | full 256K context |
| Gemma 4 26B-A4B GGUF Q4_0 (QAT) · llama.cpp | 14.4 GB | 21 MB | RTX 3090, RTX 4090, RTX A6000, RTX 5090, RTX 6000 Ada and more | RTX 3090 · $0.22/hr | full 256K context |
| Gemma 4 12B BF16 · vLLM | 23.9 GB | 17 MB | RTX A6000, RTX 5090, RTX 6000 Ada, L40S, A100 80GB and more | RTX A6000 · $0.48/hr | full 256K context |
| Gemma 4 12B 4-bit QAT (W4A16) · vLLM | 10.3 GB | 17 MB | RTX 3090, RTX 4090, RTX A6000, RTX 5090, RTX 6000 Ada and more | RTX 3090 · $0.22/hr | full 256K context |
| Qwen3.6-35B-A3B FP8 (official) · vLLM | 37.5 GB | 21 MB | RTX A6000, RTX 6000 Ada, L40S, A100 80GB, RTX PRO 6000 and more | RTX A6000 · $0.48/hr | full 256K context |
| Qwen3.6-35B-A3B GGUF Q4_K_M · llama.cpp | 22.1 GB | 21 MB | RTX 3090, RTX 4090, RTX A6000, RTX 5090, RTX 6000 Ada and more | RTX 3090 · $0.22/hr | ≈95K tokens |
| Llama 3.3 70B FP8 · vLLM | 72.7 GB | 336 MB | RTX PRO 6000, H200, B200 | RTX PRO 6000 · $1.60/hr | ≈55K tokens |
| Llama 3.3 70B 4-bit (W4A16) · vLLM | 39.5 GB | 336 MB | A100 80GB, RTX PRO 6000, H100, H200, B200 | A100 80GB · $0.84/hr | ≈109K tokens |
Weights are the real file sizes. “Runs on one GPU” means room for at least 32K tokens of context for one request. Cheapest is the typical marketplace price on 5 Dec 2026. Models: gpt-oss, Qwen3.8-27B, Gemma 4.
From the number to a running API
Found a GPU that fits? Rent it by the hour on the marketplace and start vLLM or llama.cpp with the commands from our model guides. If you would rather have a production endpoint with authentication, autoscaling, monitoring and 24/7 support, we set it up on GPUs you pay for directly, with no markup.
Cloud GPU prices
Daily prices and 90-day history for the GPUs in the calculator.
RTX 4090 · RTX 5090 · L40S · RTX PRO 6000 · A100 · H100 · H200 · B200 · all GPUs →
What self-hosting each model costs per month →
A100 vs H100 vs H200 vs B200 for LLMs →
RTX 5090 vs 4090 vs 3090 for LLMs →
What LoRA fine-tuning costs →
VRAM questions
How much VRAM do I need to run a 7B or 8B model?
About 16 GB for the weights in BF16 (2 bytes per parameter), 8–9 GB in FP8 and about 5 GB in 4-bit (GGUF Q4_K_M or AWQ). Add the KV cache: a Llama-style 8B model with 32 layers and 8 KV heads stores 128 KB per token, so 32K tokens of context take about 4.3 GB. A 24 GB GPU such as the RTX 4090 runs an 8B model in BF16 with long context; 4-bit versions fit on 8–12 GB cards.
How much VRAM do I need for a 70B model?
Llama 3.3 70B takes 72.7 GB in FP8 and 39.5 GB in 4-bit, plus 320 KB of KV cache per token (about 10.7 GB for 32K tokens). The 4-bit version fits on one 80 GB GPU with ≈108K tokens of context room on an H100; FP8 needs an H200 (full 128K context) or two 80 GB GPUs.
Does context length change how much VRAM I need?
Yes. The KV cache grows linearly with the number of tokens, and concurrent requests add up: 8 users with 32K tokens each need as much cache as one request with 256K. vLLM allocates the cache up front from the memory left after the weights and shares it between requests; when it is too small, requests wait in the queue or the server refuses to start with the requested maximum length.
Can I split a model across several GPUs?
Yes. vLLM splits a model with tensor parallelism (--tensor-parallel-size 2, 4 or 8), and llama.cpp splits layers across GPUs. Memory adds up, minus a reserve on each GPU. Data-center GPUs (A100, H100, H200, B200) connected with NVLink scale best; consumer cards talk over PCIe, which works but is slower for tensor parallelism.
What does an 8-bit KV cache change?
It halves the memory of the KV cache, so you get about twice the context or twice the concurrent users on the same GPU. In vLLM it is --kv-cache-dtype fp8, in llama.cpp -ctk q8_0 -ctv q8_0. The quality loss is small for most models, but test it on your own prompts.
How accurate is this calculator?
It is a calculation, not a measurement. For the listed models the weights come from the actual files and the KV cache from each model's configuration; the engine reserve follows vLLM and llama.cpp defaults. Real usage changes with the engine version, vision encoders and batch settings, so keep about 10% headroom.
Where do the GPU prices come from?
From the Vast.ai public GPU pricing feed, updated daily. We show the typical (median) hourly price of a single GPU; multi-GPU servers are estimated as that price times the number of GPUs. The prices above are from 5 Dec 2026.