Why Fine-Tuning Jobs Take Longer Than FLOP Estimates Predict
Why Fine Tuning Jobs Take Longer Than FLOP Estimates Predict Estimating the duration of a fine tuning job is important when GPUs are shared. If a job finishes early, capacity ca...
By Software Development Team
Why Fine-Tuning Jobs Take Longer Than FLOP Estimates Predict
Estimating the duration of a fine-tuning job is important when GPUs are shared. If a job finishes early, capacity can remain idle while the next job waits to be dispatched. If it runs late, queued work, experiments, and delivery schedules are delayed.
A common approach is to estimate training time from floating-point operations, or FLOPs. In practice, this calculation often misses significant parts of the job. A study of 272 production supervised fine-tuning (SFT) runs found that a CatBoost model using only information available before dispatch predicted duration substantially more accurately than FLOP-based estimates.
The runs used NVIDIA H200 GPUs and represented approximately 7,382 GPU-hours. In five-fold cross-validation, the FLOP baseline achieved an R² of 0.31 and a mean absolute error (MAE) of 12.41 hours. The CatBoost model reached R² = 0.98, an MAE of 1.71 hours, and a median absolute error of 0.51 hours.
The compute-only estimate
For a dense Transformer, training requires approximately 6 · P · D floating-point operations, where P is the number of parameters and D is the number of training tokens. Dividing this amount by the available GPU throughput produces an estimate for the training loop:
T_theoretical = (6 · P · D) / (N_GPU · FLOPS_peak · MFU)
Here:
N_GPUis the number of GPUs.FLOPS_peakis the peak throughput of one GPU according to its specifications.MFUis Model FLOPs Utilization, the fraction of peak throughput reached during training.
Actual jobs do not operate at peak throughput because of memory traffic, communication, and kernel inefficiencies. MFU commonly falls between 30% and 60%, but the appropriate value for a particular job is not known in advance.
The formula describes the optimization loop, but an end-to-end job includes additional work. Before training begins, the system may need to prepare the environment, download and load the model, and tokenize data. During training, it performs evaluations and uploads checkpoints. At the end, the final model is written to object storage. On a multi-tenant cluster, these activities also compete with other jobs for network and storage bandwidth.
These overheads depend on configuration and do not scale predictably with workload size or GPU count. As a result, two jobs with similar nominal compute can have substantially different completion times.
For a fair comparison, the tested FLOP baseline included evaluation tokens as well as training tokens, with MFU swept across a broad range.
The prediction approach
The study treated end-to-end duration as a supervised regression problem. The target was wall-clock time from GPU allocation to job completion, excluding queue time. Each feature had to be available before dispatch, including hyperparameters, dataset sizes, model identifiers, and GPU allocation.
The feature set also included variables intended to represent overheads. Examples included:
num_eval_data, the number of samples processed across all evaluation cycles.num_saves, the number of checkpoints saved.num_params_saved, representing checkpoint I/O volume.- Per-GPU token volumes.
baseline_time, the FLOP estimate calculated with MFU fixed at 0.45.
The baseline estimate was supplied as one feature so that the model could learn corrections to the compute-only prediction.
The study compared Linear Regression, Ridge, XGBoost, and CatBoost. Feature selection used correlation filtering, mutual information, and permutation importance across 18 candidate feature sets. A grid search then selected models using MAE as the criterion. The final CatBoost model used 24 features.
Dataset and infrastructure
The dataset consisted of:
- 272 SFT runs from operational logs in a corporate production environment.
- Several model families with up to 15 billion parameters.
- Both LoRA and full fine-tuning.
- A broad range of dataset sizes and hyperparameters.
- Jobs using 1, 2, or 4 GPUs from a pool of 8 to 32 NVIDIA H200s.
- Runs distributed across 1 to 4 nodes alongside other training and inference workloads.
- Measured durations between 1.6 and 172.4 hours, with a mean of 23.43 hours and a median of 15.29 hours.
- A software stack based on Hugging Face Transformers and Unsloth.
The stack was represented as a categorical feature. The analysis did not assume a fixed speed difference between Hugging Face Transformers and Unsloth.
Results
The results below come from stratified five-fold cross-validation. The first four rows are analytical estimates and do not involve model fitting.
| Model | R² | RMSE (h) | MAE (h) |
|---|---|---|---|
| FLOP baseline, MFU 30% | 0.31 | 20.45 | 12.41 |
| FLOP baseline, MFU 45% | 0.18 | 22.38 | 13.01 |
| FLOP baseline, MFU 60% | 0.01 | 24.56 | 14.62 |
| Calculon | -0.51 | 30.40 | 20.36 |
| Linear Regression | 0.69 ± 0.14 | 13.52 ± 4.23 | 7.52 ± 0.49 |
| Ridge | 0.73 ± 0.09 | 12.72 ± 3.70 | 7.23 ± 0.68 |
| XGBoost | 0.97 ± 0.01 | 4.18 ± 1.17 | 1.95 ± 0.32 |
| CatBoost | 0.98 ± 0.01 | 3.52 ± 0.78 | 1.71 ± 0.33 |
Several findings stand out.
MFU alone does not solve the problem
The study swept MFU from 0.25 to 0.65. The best FLOP-baseline setting was 30%, but it still produced a mean error above 12 hours for jobs that lasted 23 hours on average.
A more detailed analytical model still leaves a gap
The second analytical baseline was Calculon, an LLM-training performance model described by Isaev et al. at SC '23. Calculon builds an explicit layer graph and accounts for computation, memory traffic, and inter-device communication.
The public implementation was extended to support LoRA, grouped-query attention, fused attention, bfloat16, and SwiGLU. Its estimates nevertheless had a median equal to only 11% of the observed wall-clock time.
This result does not evaluate Calculon as a step-level tool, which is what it was designed to be. Instead, it illustrates how much production-job time can occur outside the optimization step.
Linear models improve predictions, but plateau
Ridge reduced MAE to 7.23 hours, but the relationship between configuration and duration was not captured well by a purely linear model.
Gradient boosting captured the remaining relationships
CatBoost and XGBoost were within one standard deviation of each other on every metric. CatBoost was selected for continued analysis because it had the lowest mean error across the reported metrics.
Features associated with prediction accuracy
CatBoost feature importance concentrated on a small group of variables. Model and workload characteristics were important, but evaluation and checkpoint settings also ranked highly.
num_eval_data ranked first, followed by num_trainable_params, batch_eval_size_percent, num_all_params, and num_gpus*batch_train_percent. num_params_saved was also near the top.
SHAP analysis showed a similar pattern. Larger evaluation volumes consistently increased predicted duration. Trainable parameter count had a nonlinear effect that became particularly large for the biggest models.
Feature importance does not establish causation. However, the pattern corresponds to the way these jobs consume time. Evaluation frequency, evaluation-set size, checkpoint volume, model scale, and dataset scale all influence wall-clock duration. These settings are often chosen as part of a training configuration without being included in simple compute estimates.
One point requires careful interpretation: larger GPU allocations had positive contributions to predicted duration in this dataset. Larger allocations were associated with larger jobs, so num_gpus partly acted as a proxy for job scale. This does not mean that adding GPUs makes a job slower.
Prediction errors by job duration
Across all 272 out-of-fold predictions, the median absolute error was 0.51 hours. Eighty percent of predictions were within 2.20 hours, and 90% were within 4.31 hours.
| Job duration (h) | Runs | Median absolute error (h) | P90 (h) |
|---|---|---|---|
| 1.56 to 5 | 60 | 0.30 | 1.55 |
| 5 to 10 | 63 | 0.18 | 1.27 |
| 10 to 30 | 69 | 0.73 | 4.17 |
| 30 to 60 | 67 | 1.06 | 5.50 |
| 60 to 175 | 13 | 5.19 | 18.51 |
For jobs lasting up to 60 hours, the median error remained around one hour or less. Errors increased in the long-duration group, which contained only 13 runs. The limited number of long runs makes this primarily a data limitation.
Additional data also appeared useful. On a fixed 20% holdout set, MAE decreased from 1.63 hours to 1.50 hours when the training partition increased from 85% to 100%, with no clear plateau.
Scheduling applications
A pre-dispatch duration estimate can help a scheduler determine which jobs to run together, when GPUs are likely to become available, and whether a job is expected to finish before a deadline.
Limitations
The analysis has several limitations:
- SFT only: It did not include other training and alignment methods, such as RLHF, DPO, or RLVR.
- One GPU type: All runs used H200s. The fitted model is calibrated to that infrastructure and should not be expected to transfer numerically to other GPU generations without retraining.
- Limited hardware descriptors: A predictor for mixed GPU pools would need information such as compute throughput, memory capacity, memory bandwidth, and interconnect topology.
- Few very long runs: Prediction errors increased above 60 hours, where the dataset contained only 13 jobs.
The general method may transfer to other settings: include overhead-aware features, account for multicollinearity during feature selection, and use a consistent comparison protocol. The full paper is expected to describe the feature formulas, selection procedure, search spaces, and final hyperparameters in detail so the pipeline can be rebuilt on execution-log datasets with a similar structure.
Planned extensions include hardware-specific descriptors, validation on other GPU types, transfer learning for configurations with few observations, additional training objectives, and more data for long-running jobs.