Cost to train · prices checked 2026-11-19

How much does it cost to train Gemma 2 9B?

Fine-tuning Gemma 2 9B with LoRA on 100 million tokens takes about 3.3 GPU-hours on an MI300X: $8.47 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 MI300XBF163.33.3 hours$8.47DigitalOcean 
1 x H100 SXMBF164.34.3 hours$8.60Voltage Parkfrom $3.41
2 x RTX 4090BF162612.9 hours$8.80RunPod 
1 x L40SBF161211.8 hours$9.33RunPodfrom $8.74
1 x RTX A6000BF162827.6 hours$9.67Thunder Compute$12.64
1 x B200BF161.91.9 hours$10.32Massed Computefrom $1.88

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

Full fine-tune, by GPU

MachineGPU-hoursTime on itOn-demandInterruptible
1 x MI300XBF164443.9 hours$114DigitalOcean 
3 x H100 SXMBF165819.3 hours$115Voltage Parkfrom $45.85
7 x RTX 4090BF163482.1 days$118RunPod 
4 x L40SBF1615939.7 hours$125RunPodfrom $117
4 x RTX A6000BF163713.9 days$130Thunder Compute$170
1 x B200BF162625.5 hours$139Massed Computefrom $25.27

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

Pretraining, by GPU

MachineGPU-hoursTime on itOn-demandInterruptible
1 x MI300XBF168,117338.2 days$21,022DigitalOcean 
3 x H100 SXMBF1610,725149.0 days$21,343Voltage Parkfrom $8,473
7 x RTX 4090BF1664,235382.3 days$21,840RunPod 
4 x L40SBF1629,310305.3 days$23,155RunPodfrom $21,689
4 x RTX A6000BF1668,550714.1 days$23,993Thunder Compute$31,362
1 x B200BF164,716196.5 days$25,609Massed Computefrom $4,669

Gemma 2 9B: 9.24 billion parameters, 42 layers, 16 attention heads of size 256, from its published configuration. Peak throughput from each GPU's vendor (gpu-specs.json). Try other settings on the calculator.

Questions

Gemma 2 9B, answered

How much does it cost to fine-tune Gemma 2 9B?

Fine-tuning Gemma 2 9B with LoRA on 100 million tokens takes about 3.3 GPU-hours on an MI300X: $8.47 at today's cheapest on-demand price (DigitalOcean), at 35% MFU. Training every weight of Gemma 2 9B on 1 billion tokens takes about 44 GPU-hours on an MI300X: $114 at today's cheapest on-demand price (DigitalOcean), at 35% MFU.

How much would it cost to pretrain Gemma 2 9B from scratch?

On the compute-optimal 185 billion tokens (about 20 tokens per parameter, as Chinchilla found), about 8,117 GPU-hours on an MI300X: $21,022 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.