Cost to train · prices checked 2026-11-19

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

Fine-tuning Gemma 2 27B with LoRA on 100 million tokens takes about 7.7 GPU-hours on an MI300X: $20.02 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 MI300XBF167.77.7 hours$20.02DigitalOcean 
1 x H100 SXMBF161010.2 hours$20.32Voltage Parkfrom $8.07
3 x RTX 4090BF166120.4 hours$20.80RunPod 
2 x L40SBF162814.0 hours$22.05RunPodfrom $20.65
2 x RTX A6000BF166532.6 hours$22.85Thunder Compute$29.86
1 x B200BF164.54.5 hours$24.39Massed Computefrom $4.45

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

Full fine-tune, by GPU

MachineGPU-hoursTime on itOn-demandInterruptible
3 x MI300XBF1611036.8 hours$286DigitalOcean 
7 x H100 SXMBF1614620.8 hours$290Voltage Parkfrom $115
21 x RTX 4090BF1687341.6 hours$297RunPod 
11 x L40SBF1639836.2 hours$315RunPodfrom $295
11 x RTX A6000BF169323.5 days$326Thunder Compute$426
3 x B200BF166421.4 hours$348Massed Computefrom $63.46

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

Pretraining, by GPU

MachineGPU-hoursTime on itOn-demandInterruptible
3 x MI300XBF1660,011833.5 days$155,427DigitalOcean 
7 x H100 SXMBF1679,298472.0 days$157,804Voltage Parkfrom $62,646
21 x RTX 4090BF16474,926942.3 days$161,475RunPod 
11 x L40SBF16216,704820.8 days$171,196RunPodfrom $160,361
11 x RTX A6000BF16506,8331,919.8 days$177,392Thunder Compute$231,876
3 x B200BF1634,870484.3 days$189,345Massed Computefrom $34,521

Gemma 2 27B: 27.2 billion parameters, 46 layers, 32 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

Gemma 2 27B, answered

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

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

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

On the compute-optimal 544 billion tokens (about 20 tokens per parameter, as Chinchilla found), about 60,011 GPU-hours on an MI300X: $155,427 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.