Will it fit? · prices checked 2026-11-19
How much GPU memory does Llama 3.1 405B need?
Llama 3.1 405B needs about 816 GB of GPU memory to run in BF16 with an 8K context (811.8 GB of weights, 4.2 GB of key-value cache), 410.1 GB in INT8 and 207.2 GB in INT4. The cheapest machine that holds it in BF16 today: 5 x MI300X at $12.95 an hour (DigitalOcean).
Memory, 8K context, batch 1
By precision
| Precision | Weights GB | KV cache GB | Total GB |
|---|---|---|---|
| BF16 | 811.8 | 4.2 | 816 |
| INT8 | 405.9 | 4.2 | 410.1 |
| INT4 | 202.9 | 4.2 | 207.2 |
Llama 3.1 405B: 405.9 billion parameters, 126 layers, 8 key-value heads of size 128, from its published configuration. Try other settings on the calculator.
Machines that hold it · 2026-11-19
The cheapest ones that fit (BF16)
One machine of up to 8 GPUs, each provider's cheapest listed price; running across several GPUs splits the model between them.
| Machine | On-demand $/hour | Interruptible $/hour |
|---|---|---|
| 5 x MI300X192 GB each | $12.95DigitalOcean | |
| 7 x H200141 GB each | $21.98Northflank | from $5.53 |
| 6 x B200180 GB each | $32.58Massed Compute | from $5.94 |
Questions
Llama 3.1 405B, answered
How much GPU memory does Llama 3.1 405B need?
Llama 3.1 405B needs about 816 GB of GPU memory to run in BF16 with an 8K context (811.8 GB of weights, 4.2 GB of key-value cache), 410.1 GB in INT8 and 207.2 GB in INT4. The cheapest machine that holds it in BF16 today: 5 x MI300X at $12.95 an hour (DigitalOcean).
Can I fine-tune Llama 3.1 405B on one GPU?
With QLoRA (4-bit weights) it needs at least 231.5 GB plus activations; a full fine-tune needs at least 6498.6 GB, which takes several GPUs.
How is this worked out?
Weights: parameters times bytes per parameter (BF16 2, INT8 1, INT4 0.5). The key-value cache: 2 x layers x key-value heads x head size x 2 bytes x context x batch. LoRA adds about 4% of the weights; a full fine-tune adds 14 bytes a parameter (gradients, Adam's two moments, 32-bit master weights). A GPU can use about 90% of its memory. Activations during training come on top, so treat a fine-tune's number as the least it needs.
Other models: Llama 3.1 8B · Llama 3.1 70B · Qwen2.5 7B · Qwen2.5 72B · Mistral 7B · Mixtral 8x7B · Gemma 2 9B · Gemma 2 27B · Phi-3 mini