Cost to train · prices checked 2026-11-19
How much does it cost to train Llama 3.1 405B?
Fine-tuning Llama 3.1 405B with LoRA on 100 million tokens takes about 111 GPU-hours on an MI300X: $287 at today's cheapest on-demand price (DigitalOcean), at 35% MFU.
LoRA fine-tune on 100 million tokens · 8K context · 35% MFU
LoRA fine-tune, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 5 x MI300XBF16 | 111 | $287DigitalOcean | |
| 12 x H100 SXMBF16 | 147 | $292Voltage Park | from $116 |
| 40 x RTX 4090BF16 | 878 | $298RunPod | |
| 20 x L40SBF16 | 400 | $316RunPod | from $296 |
| 20 x RTX A6000BF16 | 936 | $328Thunder Compute | $428 |
| 6 x B200BF16 | 64 | $350Massed Compute | from $63.78 |
Full fine-tune on 1 billion tokens · 8K context · 35% MFU
Full fine-tune, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 38 x MI300XBF16 | 1,602 | $4,148DigitalOcean | |
| 91 x H100 SXMBF16 | 2,116 | $4,212Voltage Park | from $1,672 |
| 301 x RTX 4090BF16 | 12,675 | $4,310RunPod | |
| 151 x L40SBF16 | 5,784 | $4,569RunPod | from $4,280 |
| 151 x RTX A6000BF16 | 13,527 | $4,734Thunder Compute | $6,188 |
| 41 x B200BF16 | 931 | $5,053Massed Compute | from $921 |
Pretraining on 8.1 trillion tokens, 20 per parameter · 8K context · 35% MFU
Pretraining, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 38 x MI300XBF16 | 13,001,705 | $33,674,417DigitalOcean | |
| 91 x H100 SXMBF16 | 17,180,543 | $34,189,281Voltage Park | from $13,572,629 |
| 301 x RTX 4090BF16 | 102,896,064 | $34,984,662RunPod | |
| 151 x L40SBF16 | 46,950,503 | $37,090,898RunPod | from $34,743,372 |
| 151 x RTX A6000BF16 | 109,808,977 | $38,433,142Thunder Compute | $50,237,607 |
| 41 x B200BF16 | 7,554,858 | $41,022,877Massed Compute | from $7,479,309 |
Llama 3.1 405B: 405.9 billion parameters, 126 layers, 128 attention heads of size 128, from its published configuration. Peak throughput from each GPU's vendor (gpu-specs.json). Try other settings on the calculator.
Questions
Llama 3.1 405B, answered
How much does it cost to fine-tune Llama 3.1 405B?
Fine-tuning Llama 3.1 405B with LoRA on 100 million tokens takes about 111 GPU-hours on an MI300X: $287 at today's cheapest on-demand price (DigitalOcean), at 35% MFU. Training every weight of Llama 3.1 405B on 1 billion tokens takes about 1,602 GPU-hours on an MI300X: $4,148 at today's cheapest on-demand price (DigitalOcean), at 35% MFU.
How much would it cost to pretrain Llama 3.1 405B from scratch?
On the compute-optimal 8.1 trillion tokens (about 20 tokens per parameter, as Chinchilla found), about 13,001,705 GPU-hours on an MI300X: $33,674,417 at today's cheapest on-demand price, before any failed runs or experiments.
How is this worked out?
Training FLOPs: for each token, 6 x the parameters a token uses for a full update (2 forward, 4 backward), or 4 x for LoRA, whose frozen weights need no weight gradients; plus attention's 12 x layers x heads x head size x context (PaLM, Appendix B). GPU-hours: those FLOPs over the GPU's peak dense throughput, from its vendor, times the share of it training reaches (model FLOPs utilisation, MFU; 35% unless you change it). Cost: GPU-hours times each GPU's cheapest price per GPU-hour in the index. Machines: enough GPUs to hold the model for that kind of training (see Will it fit?); the time on them assumes the work splits evenly. Every GPU gets the same MFU, a simplification: real utilisation differs by GPU, software and job, so treat rows within about 20% of each other as a tie.
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