Predicting Fine-Tuning Wall-Clock Time: CatBoost Beats FLOP Estimates (R² 0.98 vs 0.31)
A team at Dharma-AI, publishing on the Hugging Face blog, measured how badly standard FLOP-based math predicts fine-tuning job duration and showed that a learned predictor using only information available before a job is dispatched can close most of the gap. Across 272 production supervised fine-tuning runs on NVIDIA H200 GPUs (about 7,382 GPU-hours), a FLOP-based estimate reached R² = 0.31 with a mean absolute error of 12.41 hours, while a CatBoost regressor reached R² = 0.98 with a mean absolute error of 1.71 hours and a median absolute error of 0.51 hours in 5-fold cross-validation. The finding matters because GPU duration estimates are the input to every scheduling decision on a shared cluster, and a 12-hour error on a job that averages 23.43 hours is the difference between a plan and a guess.
The core result in one table
All figures below come from stratified 5-fold cross-validation on the same 272 runs. The four analytical rows involve no 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 (analytical performance model) | -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 |
Gradient boosting supplies nearly all of the improvement. CatBoost and XGBoost land within one standard deviation of each other on every metric; the authors carry CatBoost forward because it has the lowest mean error across the board.
The standard estimate models the optimization loop, not the job
For a dense Transformer, training cost is roughly 6 * P * D floating-point operations, where P is the parameter count and D is the number of training tokens. Dividing by delivered throughput gives a training-loop time:
T_theoretical = (6 * P * D) / (N_GPU * FLOPS_peak * MFU)
Here N_GPU is the number of GPUs, FLOPS_peak is the per-GPU peak throughput from the spec sheet, and MFU (Model FLOPs Utilization) is the fraction of peak actually achieved. Real jobs never reach peak because of memory traffic, communication and kernel inefficiencies, so MFU typically lands between 30% and 60% and the correct value for a given job is unknown in advance.
That formula describes the optimization loop well. A production job is larger than its loop. Before the first step there is environment setup, model download and loading, and tokenization. During training there are periodic evaluations and checkpoint uploads. At the end the final model is written to object storage. On a multi-tenant cluster all of this competes with other jobs for network and storage I/O. These overheads depend on configuration and do not scale neatly with workload size or GPU count, so two jobs with the same nominal compute can finish hours apart.
To keep the comparison fair, the FLOP baseline tested in the study counts scheduled evaluation tokens as well as training tokens, and MFU is swept over a wide range.
What the learned predictor is and is not allowed to see
The task is framed as supervised regression: given a feature vector built from the job configuration and model metadata, predict wall-clock time between the moment a job receives its GPUs and the moment it completes. Queue time is excluded.
Two design constraints define the work:
- Everything is known before dispatch. Every input comes from the submitted configuration: hyperparameters, dataset sizes, model identifiers and GPU allocation. No runtime logs and no partial progress signals are used, which is what makes the prediction usable for scheduling rather than for retrospective reporting.
- Features are engineered to expose overheads. On top of the raw configuration the authors derive quantities including num_eval_data (samples processed across all evaluation cycles), num_saves and num_params_saved (checkpoint I/O), and per-GPU token volumes. The FLOP estimate itself, with MFU fixed at 0.45, enters as a feature called baseline_time, so the model starts from the compute-only number and learns the corrections to it.
Linear Regression, Ridge, XGBoost and CatBoost were compared. Feature selection combined correlation filtering, mutual information and permutation importance across 18 candidate feature sets, followed by a grid search with MAE as the criterion. The final CatBoost model uses 24 features.
The dataset: 272 production SFT runs on shared H200s
- 272 supervised fine-tuning runs taken from the operational logs of a corporate production environment, covering several model families up to 15 billion parameters, both LoRA and full fine-tuning, and a wide range of dataset sizes and hyperparameters.
- Shared infrastructure. Jobs ran on 1, 2 or 4 GPUs drawn from a pool of 8 to 32 H200s across 1 to 4 nodes, alongside other training and inference workloads, so measured times include real contention.
- Durations from 1.6 to 172.4 hours, with a mean of 23.43 hours and a median of 15.29 hours.
- Stack: Hugging Face Transformers and Unsloth. The stack is modeled as a categorical feature with no assumption of a fixed speedup between the two.
The average job is therefore close to a full day, which is why a 12.41-hour mean error from the FLOP baseline is operationally significant rather than a rounding issue.
Neither MFU tuning nor a richer analytical model closes the gap
No single MFU value rescues the closed-form estimate. The authors swept MFU from 0.25 to 0.65; the best setting, 30%, still leaves a mean error above 12 hours on jobs that last 23 hours on average. Lower assumed MFU makes the prediction pessimistic, higher assumed MFU makes it optimistic, and neither captures job-to-job variance.
A more detailed analytical model fares worse in this setting. Calculon (Isaev et al., SC '23) is an analytical performance model for LLM training that builds an explicit layer graph and accounts for compute, memory traffic and inter-device communication. The authors extended the public implementation to cover LoRA, grouped-query attention, fused attention, bfloat16 and SwiGLU. Its estimates corresponded to a median of only 11% of observed wall-clock time. The authors are explicit that this is not a criticism of Calculon as a step-level tool, which is what it was designed for; it demonstrates how much of a production job happens outside the optimization step.
Linear models help and then stall. Ridge brings MAE down to 7.23 hours, but the relationship between configuration and duration is not well captured by a purely linear model.
Evaluation and checkpoint settings dominate feature importance
CatBoost's feature importance concentrates in a handful of variables. Model and workload variables appear as expected, but so do evaluation and checkpoint variables. num_eval_data, the total number of samples processed in evaluation over the life of the job, ranks first, followed by num_trainable_params, batch_eval_size_percent, num_all_params and num_gpus*batch_train_percent, with num_params_saved close behind.
SHAP values tell the same story: high evaluation volume consistently pushes predicted time up, while trainable parameter count has a nonlinear effect that only becomes large for the biggest models. The authors caution that feature importance is not a causal claim, but note the pattern matches how a job is actually spent. How often a team evaluates, how large the evaluation set is and how many checkpoints are persisted all shape wall-clock time alongside model and dataset scale, and these are choices people often make by habit when writing a training config.
One reading caveat: larger GPU allocations show positive contributions to predicted time. In this data, bigger allocations go with bigger jobs, so num_gpus partly acts as a proxy for job scale. It does not mean adding GPUs makes a job slower.
Error is small up to about 60 hours and widens in the sparse tail
Across all 272 out-of-fold predictions, the median absolute error is 0.51 hours, 80% of predictions land within 2.20 hours, and 90% land within 4.31 hours.
| Job duration (h) | Runs | Median abs. 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 |
Up to 60 hours the median error stays at about one hour or less. The long tail is where the model struggles, and with only 13 runs above 60 hours the authors read that as a data limitation rather than a modeling failure. More data should help: on a fixed 20% holdout, MAE drops from 1.63 hours to 1.50 hours when moving from 85% to 100% of the training partition, with no clear plateau.
Operational use and stated limitations
In practice the predictor gives a scheduler a duration it can plan around before a job starts: which jobs to run together, when GPUs will free up, and whether a run will finish in time for its deadline. Better estimates convert scheduling from guesswork into planning, reducing idle capacity between jobs.
The authors list three explicit limitations:
- SFT only. Other training and alignment strategies such as RLHF, DPO or RLVR were not included.
- One GPU type. Every run used H200s. The fitted model is calibrated to that infrastructure and should not be expected to transfer numerically to other GPU generations without retraining. A predictor for mixed pools would also need hardware descriptors such as compute throughput, memory capacity, bandwidth and interconnect topology.
- Few very long runs. Errors widen above 60 hours, where only 13 observations exist.
What does transfer is the method: overhead-aware features, multicollinearity-aware selection and the comparison protocol. The full paper is announced for arXiv and will report the feature formulas, the selection procedure, the search spaces and the final hyperparameters, so the pipeline can be rebuilt on any execution-log dataset with a similar structure. Planned next steps include hardware-specific descriptors, validation on other GPU types, transfer learning for configurations with few observations, other training objectives, and more data on long runs.
Why this matters beyond one cluster
The result is a concrete demonstration that the gap between nominal compute and real wall-clock time is large, structured and learnable. For anyone capacity-planning on shared accelerators, the practical implication is that the FLOP formula is a description of the inner loop, not a forecast of the job, and that evaluation cadence and checkpoint policy are scheduling variables on par with model size. The predictor is not a general-purpose tool yet, since it is calibrated to H200s and supervised fine-tuning, but the reported error profile (median 0.51 hours, 90th percentile 4.31 hours) sets a concrete bar for what an overhead-aware duration model can achieve from pre-dispatch information alone.