An LLM needs VRAM for its weights (parameters × bytes per parameter: 2 for BF16, 1 for FP8, about 0.55 at 4-bit), KV cache for every active token, and 10–20% headroom. An 8B model in BF16 needs about 20 GB; Llama 3.3 70B needs about 80 GB in FP8 or 160 GB in BF16.
- Weights formula
- Parameters (billions) × bytes per parameter = GB
- KV cache formula
- 2 × layers × KV heads × head dim × bytes, per token
- Llama 3.3 70B KV cache
- 0.33 MB per token FP16; 32k tokens ≈ 10.7 GB per sequence
- Headroom
- 10–20% for activations, CUDA context and the serving engine
- 8B model, BF16
- About 16 GB weights; fits a 24 GB card
- 70B model, FP8
- About 70 GB weights; one 80–141 GB card
- 671B model (DeepSeek-R1), FP8
- About 671 GB weights; eight 141 GB or 180 GB GPUs
GPU memory is the hard limit in LLM inference: if the model and its working state do not fit in VRAM, the job either fails or slows to a crawl. The good news is that the sum is simple and predictable. This guide gives the formulas, runs them for the models people actually deploy, and shows how many concurrent users each GPU can hold.
Every figure is arithmetic you can check. Throughput and cost questions are covered in the complete guide to LLM inference; this page is only about fitting.
What takes up GPU memory when you run an LLM?
Three things: the model weights, the KV cache, and overhead. Weights are fixed for a given model and precision. The KV cache grows with context length and concurrency. Overhead is the CUDA context, activations and the serving engine's own buffers.
VRAM needed ≈ weights + KV cache + overhead
weights (GB) = parameters (billions) × bytes per parameter
KV cache (bytes) = 2 × layers × KV heads × head dim × bytes per value × tokens in flight
overhead ≈ 10–20% of the total, or a few GB, whichever is largerBytes per parameter: BF16 or FP16 is 2, FP8 or INT8 is 1, and 4-bit formats such as AWQ, GPTQ and GGUF Q4_K_M are about 0.5–0.6 once scales and the few layers kept at higher precision are counted. If VRAM itself is new to you, start there.
How much memory do the model weights take?
Multiply the parameter count by bytes per parameter. The table uses 0.55 bytes per parameter for 4-bit.
| Model | Parameters | BF16 | FP8 | 4-bit |
|---|---|---|---|---|
| Llama 3.1 8B | 8.0B | 16 GB | 8 GB | ~4.4 GB |
| Qwen3 14B | 14.8B | 30 GB | 15 GB | ~8 GB |
| Qwen3 32B | 32.8B | 66 GB | 33 GB | ~18 GB |
| Llama 3.3 70B | 70.6B | 141 GB | 71 GB | ~39 GB |
| Qwen3 235B-A22B | 235B | 470 GB | 235 GB | ~129 GB |
| Llama 3.1 405B | 405B | 810 GB | 405 GB | ~223 GB |
| DeepSeek-R1 | 671B | 1,342 GB | 671 GB | ~369 GB |
Two special cases. OpenAI's gpt-oss models ship their expert weights in 4-bit MXFP4, which is how gpt-oss-120b fits on a single 80 GB GPU and gpt-oss-20b within 16 GB, as stated on the gpt-oss-120b model card. And mixture-of-experts models need memory for all their parameters, even though only some are active per token.
How big is the KV cache?
The KV cache stores each processed token's attention keys and values for every layer. Its size per token is fixed by the architecture; its total size is that figure × context length × concurrent sequences.
| Model | Layers | KV heads | Head dim | KV per token (FP16) | One 8k sequence | One 32k sequence | One 128k sequence |
|---|---|---|---|---|---|---|---|
| Llama 3.1 8B | 32 | 8 | 128 | 0.13 MB | 1.1 GB | 4.3 GB | 17.2 GB |
| Qwen3 8B | 36 | 8 | 128 | 0.15 MB | 1.2 GB | 4.8 GB | 19.3 GB |
| Qwen3 32B | 64 | 8 | 128 | 0.26 MB | 2.1 GB | 8.6 GB | 34.4 GB |
| Llama 3.3 70B | 80 | 8 | 128 | 0.33 MB | 2.7 GB | 10.7 GB | 42.9 GB |
| Qwen3 235B-A22B | 94 | 4 | 128 | 0.19 MB | 1.6 GB | 6.3 GB | 25.2 GB |
| DeepSeek-R1 (MLA) | 61 | latent | 576 | 0.07 MB | 0.6 GB | 2.3 GB | 9.2 GB |
Worked example for Llama 3.3 70B: 2 × 80 × 8 × 128 × 2 bytes = 327,680 bytes ≈ 0.33 MB per token, and 32,768 × 0.33 MB ≈ 10.7 GB. DeepSeek-R1 uses multi-head latent attention, which caches one compressed 576-value vector per layer instead of full keys and values: 576 × 61 × 2 bytes ≈ 70 KB per token.
Storing the KV cache in FP8 halves every figure in that table. In vLLM, that is --kv-cache-dtype fp8.
What else uses GPU memory?
Beyond weights and KV cache, expect 2–5 GB for a single GPU, more for large models. Most of that is the CUDA context and the activations produced during prefill.
- CUDA context and libraries: typically 0.5–1 GB per GPU before anything loads.
- Activations: temporary tensors during the forward pass. They scale with how many tokens are processed in one step, so long prefills need more; vLLM caps this with
--max-num-batched-tokens. - CUDA graphs: vLLM captures graphs for decode to cut launch overhead, costing a little memory.
--enforce-eagerskips them, saving memory at some cost in speed. - The engine's reservation: vLLM claims
--gpu-memory-utilization(default 0.9) of the card up front. Weights load into it, and the rest becomes KV cache blocks managed by PagedAttention, described in the vLLM paper.
One unit trap works in your favour. GPU memory is binary: an "80 GB" H100 reports about 81,500 MiB in nvidia-smi, roughly 85 decimal gigabytes. Model sizes computed from parameter counts are decimal. That 6–7% gap is part of why Llama 3.3 70B in FP8 fits an 80 GB card at all.
How many users can one GPU serve?
Divide the memory left for KV cache by the KV size of an average conversation. That gives the number of sequences that can be active at once before the engine starts queueing or pre-empting requests.
KV budget = card memory × 0.92 − weights − overhead
users ≈ KV budget ÷ (average tokens per sequence × KV per token)For Llama 3.3 70B in FP8 (about 71 GB) with an FP8 KV cache (0.164 MB per token), using each card's real byte capacity (nominal × 1.074), 92% utilisation and a 3 GB overhead allowance per GPU:
| GPU | Usable memory | KV budget | Tokens in flight | Users at 4k tokens each | Users at 16k tokens each |
|---|---|---|---|---|---|
| H100 80GB | ~79 GB | ~5 GB | ~33,000 | ~8 | ~2 |
| RTX PRO 6000 (96 GB) | ~95 GB | ~21 GB | ~130,000 | ~32 | ~8 |
| H200 (141 GB) | ~139 GB | ~66 GB | ~400,000 | ~100 | ~25 |
| 2× H100 (tensor parallel) | ~158 GB | ~81 GB | ~497,000 | ~124 | ~31 |
These are estimates, and the overhead allowance is a rule of thumb, but the shape is reliable. On an 80 GB card, 70B FP8 is a model for a handful of users. The extra 16 GB on a 96 GB card quadruples the KV budget, and an H200 serves a team. Because cost per token falls as concurrency rises, the bigger card is often cheaper per token even though it costs more per hour.
Worked examples: what GPU does my use case need?
Four common scenarios, each worked through with the formulas above.
1. One developer, Qwen3 8B, 32k context. Weights 16.4 GB in BF16 plus 4.8 GB KV is 21.2 GB; with 15% headroom, 24.4 GB. That is just over a 24 GB RTX 4090, so either cap the context at 16k or use the FP8 build (8.2 GB weights, about 15 GB total) and keep 32k.
2. A team of 20, Llama 3.3 70B, about 8k tokens per conversation. That is 160,000 tokens in flight: 26 GB of KV in FP8, or 52 GB in FP16. Add 71 GB of FP8 weights and overhead, and an H200 holds it comfortably, as do two H100s. A single H100 does not.
3. Document Q&A at 128k context, Qwen3 32B. One 131k-token sequence needs 34 GB of FP16 KV, or 17 GB in FP8. With FP8 weights (33 GB), one sequence needs about 55–75 GB; four concurrent long documents need about 100–170 GB. Use an H200, or cap documents with retrieval instead of stuffing the whole context.
4. The biggest open models. Qwen3 235B-A22B in FP8 is 235 GB of weights, so one 288 GB B300 or four 80 GB GPUs. DeepSeek-R1 in FP8 is about 671 GB, so eight H200s (1,128 GB) or eight B200s. Eight H100s (640 GB) are too small for it in FP8.
Step-by-step commands for these setups are in running Llama on a cloud GPU, running Qwen and running DeepSeek.
Which GPU fits which model?
This is the quick lookup: the largest model each card serves well for a few users at moderate context.
| GPU | VRAM | Comfortable | Possible with compromises |
|---|---|---|---|
| RTX 4090 | 24 GB | 8B BF16, 14B FP8/AWQ | 32B at 4-bit, short context |
| L40S | 48 GB | 32B AWQ, 30B-A3B FP8 | 70B at 4-bit, short context |
| A100 80GB | 80 GB | 32B BF16, 70B 4-bit | 70B FP8 weights (no FP8 compute) |
| H100 80GB | 80 GB | 32B FP8 with long context | 70B FP8, few users |
| RTX PRO 6000 | 96 GB | 70B FP8 for a small team | 120B-class 4-bit |
| H200 | 141 GB | 70B FP8 for many users, long context | 70B BF16, short context |
| B200 | 180 GB | 70B BF16; 120B-class FP8 | 235B at 4-bit |
| B300 | 288 GB | 235B-A22B FP8 | 405B at 4-bit |
For the wider decision, including bandwidth and price, see how to choose a GPU. For training memory, which is three to ten times higher per parameter, see how much VRAM you need to fine-tune an LLM.
How can you fit a model into less memory?
Use these tactics in roughly this order, because the first ones cost the least quality or speed.
- Quantise the weights to FP8. Close to lossless for most models and halves the weights. Native on Ada, Hopper and Blackwell GPUs.
- Store the KV cache in FP8. Halves the KV cache with minimal quality impact for most models.
- Cap
--max-model-lenat what your application actually uses. A 128k limit you never use still constrains scheduling. - Turn on prefix caching so shared system prompts and documents are stored once. In current vLLM releases it is on by default.
- Go to 4-bit (AWQ, GPTQ, GGUF) when FP8 still does not fit. Expect a small quality loss; the quantisation guide covers formats and trade-offs.
- Split across GPUs with tensor parallelism when the model is simply too big for one card.
- Offload to CPU only for experiments. It works, but each token waits on PCIe.
When renting from Wandering Giants Compute fits
The point of sizing carefully is to rent exactly the memory you need. Wandering Giants Compute offers eight cards from 24 GB to 288 GB, and machines with 2, 4 or 8 of the same card. Here is what each gigabyte costs per hour, a useful figure when memory, not speed, is your constraint:
| GPU | VRAM | Our price | $ per GB of VRAM per hour |
|---|---|---|---|
| RTX 4090 | 24 GB | $1.59/hr | $0.0663 |
| L40S | 48 GB | $1.89/hr | $0.0394 |
| A100 80GB | 80 GB | $3.79/hr | $0.0474 |
| H100 80GB | 80 GB | $4.99/hr | $0.0624 |
| RTX PRO 6000 | 96 GB | $4.89/hr | $0.0509 |
| H200 | 141 GB | $9.09/hr | $0.0645 |
| B200 | 180 GB | $15.49/hr | $0.0861 |
| B300 | 288 GB | $18.09/hr | $0.0628 |
Per-GB figures are each card's live price ÷ its VRAM. At 25 November 2026 prices the L40S, RTX PRO 6000 and A100 are the cheapest memory per hour, with the B300 close behind; the H100 and B200 charge for bandwidth and compute as well. Our one-click models list their minimum VRAM, from 24 GB for Qwen3 8B to 288 GB for Qwen3 235B-A22B FP8. Billing is by the minute and stops itself when prepaid credit runs out. See all GPUs and prices.
Frequently asked questions
How much VRAM do I need for a 7B or 8B model?
About 16 GB for BF16 weights plus 1–5 GB of KV cache for typical contexts, so a 24 GB card such as an RTX 4090. In FP8 the weights drop to about 8 GB, and a 4-bit build runs in under 8 GB with a short context.
How much VRAM do I need for a 70B model?
About 140 GB in BF16, 70 GB in FP8 and 40 GB at 4-bit for the weights, plus KV cache and headroom. In practice that means two or more 80 GB cards for BF16, one 80–141 GB card for FP8, and a 48–80 GB card for 4-bit.
Why does vLLM use almost all my GPU memory?
vLLM reserves the fraction set by --gpu-memory-utilization (0.9 by default) up front, loads the weights, and turns everything left into a pool of KV cache blocks. High usage in nvidia-smi is by design; it is the room for concurrent requests.
Does context length change how much VRAM I need?
Yes, linearly. Every token of context needs its own KV cache entry, so doubling the maximum context doubles the KV cache per sequence. For Llama 3.3 70B, a full 128k context needs about 43 GB of FP16 KV cache for one sequence.
Can I run a model bigger than my GPU's memory?
Yes, by offloading layers to CPU RAM with llama.cpp, Ollama or accelerate, but generation becomes several to many times slower because weights must cross PCIe for each token. Quantising or adding GPUs is almost always better for anything interactive.
Do mixture-of-experts models need less VRAM?
No. All experts must be in memory, so a MoE model needs VRAM for its total parameters. What it saves is bandwidth: only the active experts are read per token, so it decodes faster than a dense model of the same size.
Rent the GPU for this, by the minute.
Pick the exact VRAM your model needs, from a 24 GB RTX 4090 to a 288 GB B300, and pay by the minute only while it runs.
Prepaid credit, billed by the minute, stops itself when credit runs out. Prices in £, $, €, ¥, CA$, A$, CHF and S$; UK prices include VAT.
Keep reading
- Complete guideWhat Is LLM Inference? A Complete Technical Guide
- GuideWhat Is GPU VRAM and Why Does It Matter for AI?
- GuideQuantization Explained: Running Large AI Models on Smaller GPUs
- GuideHow to Choose the Right GPU for Your AI Workload
- GuideHow Much VRAM Do You Need to Fine-Tune an LLM?
- TutorialHow to Run Llama on a Cloud GPU: Step-by-Step Guide
About this article. Written by the Wandering Giants Compute team, the people who run Wandering Giants Compute. Hardware figures are the manufacturers’ published specifications. Speeds and costs marked as estimates are worked out from those specifications and our current prices, with the method shown; they are not measured benchmarks. Wandering Giants prices are taken live from our price list each time this page is built.
Last reviewed 25 November 2026.