Rule of thumb for full fine-tuning: compute is about 6 times parameters times tokens processed (FLOPs). For a 7B model on 10 million tokens for 3 epochs: 6 x 7e9 x 3e7, about 1.3e18 FLOPs, which is roughly 3.5 GPU-hours at an effective 100 TFLOPs per GPU.
Adjust for LoRA (fewer weight-gradient computations, but the forward and backward passes through the base model still dominate), for QLoRA dequantization overhead, gradient checkpointing recompute (about 30% more), and realistic GPU utilization (often 30% to 50%).
Add costs for evaluation runs, hyperparameter sweeps, data preparation and storage; cut spend with QLoRA, spot instances with frequent checkpoints, and smaller models where quality allows.
Loading…