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

MachineGPU-hoursTime on itOn-demandInterruptible
1 x MI300XBF161.51.5 hours$3.92DigitalOcean 
1 x H100 SXMBF162.02.0 hours$3.98Voltage Parkfrom $1.58
1 x RTX 4090BF161212.0 hours$4.07RunPod 
1 x L40SBF165.55.5 hours$4.32RunPodfrom $4.05
1 x RTX A6000BF161312.8 hours$4.48Thunder Compute$5.85
1 x B200BF160.953 minutes$4.78Massed Computefrom $0.87

Full fine-tune on 1 billion tokens · 8K context · 35% MFU

Full fine-tune, by GPU

MachineGPU-hoursTime on itOn-demandInterruptible
1 x MI300XBF162019.8 hours$51.23DigitalOcean 
1 x H100 SXMBF162626.1 hours$52.01Voltage Parkfrom $20.65
3 x RTX 4090BF161572.2 days$53.22RunPod 
2 x L40SBF167135.7 hours$56.43RunPodfrom $52.86
2 x RTX A6000BF161673.5 days$58.47Thunder Compute$76.43
1 x B200BF161111.5 hours$62.41Massed Computefrom $11.38

Pretraining on 76 billion tokens, 20 per parameter · 8K context · 35% MFU

Pretraining, by GPU

MachineGPU-hoursTime on itOn-demandInterruptible
1 x MI300XBF161,51163.0 days$3,914DigitalOcean 
1 x H100 SXMBF161,99783.2 days$3,974Voltage Parkfrom $1,578
3 x RTX 4090BF1611,959166.1 days$4,066RunPod 
2 x L40SBF165,457113.7 days$4,311RunPodfrom $4,038
2 x RTX A6000BF1612,763265.9 days$4,467Thunder Compute$5,839
1 x B200BF1687836.6 days$4,768Massed Computefrom $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.