Weights take parameters × bytes per parameter: a 70B model needs about 141 GB at FP16, 71 GB at FP8 and 40 GB at 4-bit. Then add the KV cache, which grows with context length and the number of users, plus about 10% for the runtime. A 70B model at FP8 serving 8 users at 8K context needs about 101 GB.
1. The weights
Every parameter is stored at some precision. Multiply the parameter count by the bytes per parameter:
- FP16 / BF16: 2 bytes
- FP8: 1 byte
- 4-bit (INT4, FP4): about 0.5 bytes, plus a little for scales
| Model | FP16 | FP8 | 4-bit |
|---|---|---|---|
| 8B | 16 GB | 8 GB | about 5 GB |
| 70B | 141 GB | 71 GB | about 40 GB |
| 405B | 810 GB | 405 GB | about 230 GB |
FP8 is the usual choice for serving on Hopper and Blackwell GPUs: half the memory of FP16 with very little quality loss.
2. The KV cache
While a model generates, it keeps a key and a value for every token in the context, in every layer. That is the KV cache:
KV bytes per token = 2 × layers × KV heads × head dimension × bytesModern models use grouped-query attention, so the KV head count (8 for Llama 3.1) is much smaller than the attention head count. At FP16:
| Model | Layers | KV heads | Per token | 8K context | 128K context |
|---|---|---|---|---|---|
| Llama 3.1 8B | 32 | 8 | 0.13 MB | 1.1 GB | 17.2 GB |
| Llama 3.1 70B | 80 | 8 | 0.33 MB | 2.7 GB | 42.9 GB |
| Llama 3.1 405B | 126 | 8 | 0.52 MB | 4.2 GB | 67.6 GB |
Those are per user. Eight users at 8K context on a 70B model is 21.5 GB of KV cache. One user at the full 128K context is 42.9 GB. This is where sizing goes wrong: the model fits, then real traffic arrives.
3. Runtime overhead
CUDA context, activations and the inference server's own buffers take memory too. Add about 10%. Also leave headroom: we size so the total stays under about 90% of the card.
4. Worked examples
70B at FP8, 8 users, 8K context
71 GB weights + 21.5 GB KV (FP16) = 92.5 GB, × 1.1 = about 101 GB. Too much for one 96 GB RTX PRO 6000. Options: two RTX PRO 6000s, one H200 (141 GB), or store the KV cache in FP8, which brings it to about 89 GB: still tight on one card.
405B at FP8, 4 users, 32K context, FP8 KV cache
405 GB weights + 34 GB KV = 439 GB, × 1.1 = about 483 GB. That fits on six RTX PRO 6000s and comfortably on an 8-GPU server with 768 GB, like our Node 01.
5. Picking the GPU
Divide the total by about 90% of each card's memory, round up, and you have the GPU count. Then check bandwidth: memory bandwidth sets how fast tokens come out. Our VRAM calculator does the math for every current NVIDIA GPU, with a model list we update every month.
Questions
How much VRAM does Llama 3.1 70B need?
About 141 GB at FP16, 71 GB at FP8 and about 40 GB at 4-bit for the weights alone. Add KV cache for your context length and users, plus about 10%.
Can I run a 70B model on one GPU?
At FP8 or 4-bit, yes, on a 96 GB RTX PRO 6000 or a 141 GB H200, for a small number of users. Long contexts or many users push it to two GPUs.
How much memory does the KV cache use?
2 × layers × KV heads × head dimension × bytes per token, per user. For Llama 3.1 70B at FP16 that is about 0.33 MB per token, or 43 GB for one 128K-token context.