Cost to train · prices checked 2026-11-19
How much does it cost to train Phi-3 mini?
Fine-tuning Phi-3 mini with LoRA on 100 million tokens takes about 1.5 GPU-hours on an MI300X: $3.92 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 |
|---|---|---|---|
| 1 x MI300XBF16 | 1.5 | $3.92DigitalOcean | |
| 1 x H100 SXMBF16 | 2.0 | $3.98Voltage Park | from $1.58 |
| 1 x RTX 4090BF16 | 12 | $4.07RunPod | |
| 1 x L40SBF16 | 5.5 | $4.32RunPod | from $4.05 |
| 1 x RTX A6000BF16 | 13 | $4.48Thunder Compute | $5.85 |
| 1 x B200BF16 | 0.9 | $4.78Massed Compute | from $0.87 |
Full fine-tune on 1 billion tokens · 8K context · 35% MFU
Full fine-tune, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 1 x MI300XBF16 | 20 | $51.23DigitalOcean | |
| 1 x H100 SXMBF16 | 26 | $52.01Voltage Park | from $20.65 |
| 3 x RTX 4090BF16 | 157 | $53.22RunPod | |
| 2 x L40SBF16 | 71 | $56.43RunPod | from $52.86 |
| 2 x RTX A6000BF16 | 167 | $58.47Thunder Compute | $76.43 |
| 1 x B200BF16 | 11 | $62.41Massed Compute | from $11.38 |
Pretraining on 76 billion tokens, 20 per parameter · 8K context · 35% MFU
Pretraining, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 1 x MI300XBF16 | 1,511 | $3,914DigitalOcean | |
| 1 x H100 SXMBF16 | 1,997 | $3,974Voltage Park | from $1,578 |
| 3 x RTX 4090BF16 | 11,959 | $4,066RunPod | |
| 2 x L40SBF16 | 5,457 | $4,311RunPod | from $4,038 |
| 2 x RTX A6000BF16 | 12,763 | $4,467Thunder Compute | $5,839 |
| 1 x B200BF16 | 878 | $4,768Massed Compute | from $869 |
Phi-3 mini: 3.82 billion parameters, 32 layers, 32 attention heads of size 96, from its published configuration. Peak throughput from each GPU's vendor (gpu-specs.json). Try other settings on the calculator.
Questions
Phi-3 mini, answered
How much does it cost to fine-tune Phi-3 mini?
Fine-tuning Phi-3 mini with LoRA on 100 million tokens takes about 1.5 GPU-hours on an MI300X: $3.92 at today's cheapest on-demand price (DigitalOcean), at 35% MFU. Training every weight of Phi-3 mini on 1 billion tokens takes about 20 GPU-hours on an MI300X: $51.23 at today's cheapest on-demand price (DigitalOcean), at 35% MFU.
How much would it cost to pretrain Phi-3 mini from scratch?
On the compute-optimal 76 billion tokens (about 20 tokens per parameter, as Chinchilla found), about 1,511 GPU-hours on an MI300X: $3,914 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 · Llama 3.1 405B · Qwen2.5 7B · Qwen2.5 72B · Mistral 7B · Mixtral 8x7B · Gemma 2 9B · Gemma 2 27B