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
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 1 x MI300XBF16 | 7.7 | $20.02DigitalOcean | |
| 1 x H100 SXMBF16 | 10 | $20.32Voltage Park | from $8.07 |
| 3 x RTX 4090BF16 | 61 | $20.80RunPod | |
| 2 x L40SBF16 | 28 | $22.05RunPod | from $20.65 |
| 2 x RTX A6000BF16 | 65 | $22.85Thunder Compute | $29.86 |
| 1 x B200BF16 | 4.5 | $24.39Massed Compute | from $4.45 |
Full fine-tune on 1 billion tokens · 8K context · 35% MFU
Full fine-tune, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 3 x MI300XBF16 | 110 | $286DigitalOcean | |
| 7 x H100 SXMBF16 | 146 | $290Voltage Park | from $115 |
| 21 x RTX 4090BF16 | 873 | $297RunPod | |
| 11 x L40SBF16 | 398 | $315RunPod | from $295 |
| 11 x RTX A6000BF16 | 932 | $326Thunder Compute | $426 |
| 3 x B200BF16 | 64 | $348Massed Compute | from $63.46 |
Pretraining on 544 billion tokens, 20 per parameter · 8K context · 35% MFU
Pretraining, by GPU
| Machine | GPU-hours | On-demand | Interruptible |
|---|---|---|---|
| 3 x MI300XBF16 | 60,011 | $155,427DigitalOcean | |
| 7 x H100 SXMBF16 | 79,298 | $157,804Voltage Park | from $62,646 |
| 21 x RTX 4090BF16 | 474,926 | $161,475RunPod | |
| 11 x L40SBF16 | 216,704 | $171,196RunPod | from $160,361 |
| 11 x RTX A6000BF16 | 506,833 | $177,392Thunder Compute | $231,876 |
| 3 x B200BF16 | 34,870 | $189,345Massed Compute | from $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.
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 · Phi-3 mini