Why does fine-tuning take longer than the FLOP math predicts?
Hugging Face researchers measured 272 real fine-tuning jobs on H200 GPUs and found the standard FLOP estimate misses most of what actually consumes time. A CatBoost model using only pre-dispatch configuration data predicts wall-clock duration with a median error of just 0.51 hours.
The estimate everyone uses counts floating-point operations and divides by peak GPU throughput. It assumes the training loop is the whole job.
Real jobs never run at peak. Memory traffic and communication overhead keep Model FLOPs Utilization between 30% and 60%. The right value for a given run is not known in advance. Before the first step there is environment setup. Then model download. Then tokenization. During training there are periodic evaluations and checkpoint uploads. At the end the final model goes to object storage. On a multi-tenant cluster all of it competes with other workloads for network and storage I/O. These overheads depend on configuration and they do not scale neatly with workload or GPU count. Two jobs with the same nominal compute can finish hours apart.
What the predictor sees that FLOPs miss
The team treated end-to-end duration as a supervised regression problem. Every input comes from the submitted configuration: hyperparameters and dataset sizes. Model identifiers and GPU allocation are also included. No runtime logs, no partial progress. That is what makes the prediction usable for scheduling.
On top of the raw configuration they derived quantities such as total evaluation samples processed across all cycles. They also derived the number of checkpoints and parameters saved. They added per-GPU token volumes. The FLOP estimate itself, with MFU fixed at 0.45, goes in as one more feature so the model starts from the compute-only number and learns the corrections.
They compared Linear Regression, Ridge, XGBoost and CatBoost. Feature selection combined correlation filtering with mutual information and permutation importance across 18 candidate feature sets. A grid search used MAE as the criterion. The final CatBoost model uses 24 features.
The data behind the model
272 SFT runs from the operational logs of a corporate production environment. Model families up to 15 billion parameters. Both LoRA and full fine-tuning. A wide range of dataset sizes and hyperparameters.
Jobs ran on 1, 2 or 4 GPUs drawn from a pool of 8 to 32 H200s across 1 to 4 nodes. The pool ran alongside other training and inference workloads. The measured times include real contention. Durations from 1.6 to 172.4 hours, with a mean of 23.43 h and a median of 15.29 h. Stack: Hugging Face Transformers and Unsloth. They model the stack as a categorical feature and make no assumption about a fixed speedup between the two.
How wrong is it, and where
All numbers come from stratified 5-fold cross-validation. The FLOP baseline at its best MFU setting (30%) reaches R² = 0.31 with MAE 12.41 h. A more detailed analytical model, Calculon, corresponds to a median of only 11% of observed wall-clock time. Ridge brings MAE down to 7.23 h. CatBoost reaches R² = 0.98 ± 0.01 with MAE 1.71 ± 0.33 h and median absolute error 0.51 h.
Looking at all 272 out-of-fold predictions, 80% are within 2.20 h and 90% within 4.31 h. Broken down by job duration: up to 5 hours the median error is 0.30 h; 5 to 10 hours it is 0.18 h; 10 to 30 hours it is 0.73 h; 30 to 60 hours it is 1.06 h. The long tail is where the model struggles. Only 13 runs exceed 60 hours. Their median error is 5.19 h and P90 reaches 18.51 h. On a fixed 20% holdout MAE drops from 1.63 h to 1.50 h when going from 85% to 100% of the training partition with no clear plateau. More data should still help.
What the predictor relies on
CatBoost feature importance concentrates in a handful of features. Total evaluation samples processed over the life of the job ranks first. Trainable parameter count follows. Then evaluation batch size as a percentage. Then total parameter count. Then GPU count times training batch percentage. Parameters saved comes 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.
Feature importance is not a causal claim. Still the pattern lines up with how a job is actually spent. How often you evaluate, how large the evaluation set is and how many checkpoints you persist all shape wall-clock time alongside model and dataset scale. These are choices people often make by habit when writing a training config.
Larger GPU allocations show positive contributions to predicted time. In the data bigger allocations go with bigger jobs so GPU count acts partly as a proxy for job scale. It does not mean adding GPUs makes a job slower.
What this changes for cluster scheduling
In practice the predictor gives a scheduler a duration it can plan around before a job starts. It shows which jobs to run together. It shows when GPUs will free up. It shows whether a run will finish in time for its deadline. When a job finishes hours early GPUs sit idle until the next one is dispatched. When it runs hours late everything queued behind it slips. Better duration estimates turn this into planning instead of guesswork.
Limits of the current model
SFT only. The work did not include other training and alignment strategies such as RLHF or DPO. RLVR was also excluded. 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 and memory capacity. Bandwidth and interconnect topology are also required. Few very long runs. Errors widen above 60 hours. What does transfer is the method: overhead-aware features and multicollinearity-aware selection. The comparison protocol also transfers. The full paper will report the feature formulas and the selection procedure. It will also cover the search spaces and the final hyperparameters in full so the pipeline can be rebuilt on any execution-log dataset with a similar structure.
The sources this article was written from
- "Hugging Face Blog
https://huggingface.co/blog/Dharma-AI/predicting-fine-tuning-time"