Wandering Giants Compute · Learn
Guide

How Much GPU Memory Do You Need to Run LLMs?

The short answer

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.

text
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 larger

Bytes 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.

ModelParametersBF16FP84-bit
Llama 3.1 8B8.0B16 GB8 GB~4.4 GB
Qwen3 14B14.8B30 GB15 GB~8 GB
Qwen3 32B32.8B66 GB33 GB~18 GB
Llama 3.3 70B70.6B141 GB71 GB~39 GB
Qwen3 235B-A22B235B470 GB235 GB~129 GB
Llama 3.1 405B405B810 GB405 GB~223 GB
DeepSeek-R1671B1,342 GB671 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.

ModelLayersKV headsHead dimKV per token (FP16)One 8k sequenceOne 32k sequenceOne 128k sequence
Llama 3.1 8B3281280.13 MB1.1 GB4.3 GB17.2 GB
Qwen3 8B3681280.15 MB1.2 GB4.8 GB19.3 GB
Qwen3 32B6481280.26 MB2.1 GB8.6 GB34.4 GB
Llama 3.3 70B8081280.33 MB2.7 GB10.7 GB42.9 GB
Qwen3 235B-A22B9441280.19 MB1.6 GB6.3 GB25.2 GB
DeepSeek-R1 (MLA)61latent5760.07 MB0.6 GB2.3 GB9.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-eager skips 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.

text
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:

GPUUsable memoryKV budgetTokens in flightUsers at 4k tokens eachUsers 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.

GPUVRAMComfortablePossible with compromises
RTX 409024 GB8B BF16, 14B FP8/AWQ32B at 4-bit, short context
L40S48 GB32B AWQ, 30B-A3B FP870B at 4-bit, short context
A100 80GB80 GB32B BF16, 70B 4-bit70B FP8 weights (no FP8 compute)
H100 80GB80 GB32B FP8 with long context70B FP8, few users
RTX PRO 600096 GB70B FP8 for a small team120B-class 4-bit
H200141 GB70B FP8 for many users, long context70B BF16, short context
B200180 GB70B BF16; 120B-class FP8235B at 4-bit
B300288 GB235B-A22B FP8405B 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.

  1. Quantise the weights to FP8. Close to lossless for most models and halves the weights. Native on Ada, Hopper and Blackwell GPUs.
  2. Store the KV cache in FP8. Halves the KV cache with minimal quality impact for most models.
  3. Cap --max-model-len at what your application actually uses. A 128k limit you never use still constrains scheduling.
  4. Turn on prefix caching so shared system prompts and documents are stored once. In current vLLM releases it is on by default.
  5. 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.
  6. Split across GPUs with tensor parallelism when the model is simply too big for one card.
  7. 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:

GPUVRAMOur price$ per GB of VRAM per hour
RTX 409024 GB$1.59/hr$0.0663
L40S48 GB$1.89/hr$0.0394
A100 80GB80 GB$3.79/hr$0.0474
H100 80GB80 GB$4.99/hr$0.0624
RTX PRO 600096 GB$4.89/hr$0.0509
H200141 GB$9.09/hr$0.0645
B200180 GB$15.49/hr$0.0861
B300288 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.

Wandering Giants Compute

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

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.