Abstract: Training Large Language Models (LLMs) is one of the most compute-intensive tasks in high-performance computing. Predicting end-to-end training time for multi-billion parameter models distributed across hundreds of GPUs remains challenging due to complex interactions between transformer components, parallelism strategies (data, model, pipeline, tensor), and multi-tier communication. Learned models require costly sampling, while analytical models often struggle with real-world network and hardware complexities. We address this by decomposing LLMs into core computational primitives and modeling them with: (1) operator-level decomposition for fine-grained analysis; (2) lightweight sampling-based hardware-aware prediction models for key operations; (3) an end-to-end prediction system integrating these components across complex parallelization strategies. Our framework achieves low average prediction errors—4.98% on Perlmutter (A100) and 9.38% on Vista (GH200)—for models up to 20B parameters across 128 GPUs. Importantly, it runs entirely on CPUs, enabling rapid iteration over hardware configurations and training strategies without costly on-cluster experimentation.
Introduction
Training a Large Language Model (LLM) is a massive financial gamble. With training costs for foundation models reaching into the hundreds of millions of dollars, being off by even 10% in a time estimate can mean wasting millions in cloud credits or missing critical research deadlines. Predicting how long an LLM will take to train is notoriously difficult because it involves modeling the complex interplay of heterogeneous hardware (like NVIDIA A100 vs. GH200), 3D parallelism strategies (Data, Model, and Pipeline Parallelism), and the "sampling tax" required by current state-of-the-art predictors.
Methodology
The proposed framework utilizes a three-pronged, bottom-up methodology to take the guesswork out of LLM scaling.
Operator-Level Decomposition and Micro-benchmarking
Instead of treating the LLM as a black box, the framework breaks it down into fundamental "primitives" such as LayerNorm, Linear layers, Flash Attention, and All-Reduce operations. These individual operators are profiled in isolation across various hyperparameters (batch size, sequence length, etc.) to create a "hardware-aware" dataset that captures how specific kernels behave on specific GPU architectures.
Tree-Based Regression
The researchers use Random Forest and XGBoost to model operator performance. These tree-based models are particularly effective at capturing "step-like" performance curves—discontinuities that occur when a GPU library (like cuBLAS) switches internal algorithms based on input size.
Timeline Integration
Finally, the framework aggregates these operator predictions into a global timeline. This accounts for the 1F1B (One-Forward-One-Backward) pipeline schedule, specifically modeling how communication is overlapped with and "hidden" behind computation.
Results and Key Insights
The framework was validated using GPT-20B, LLaMA-13B, and Llemma-7B models on the Perlmutter (A100) and Vista (GH200) supercomputers. Key results include:
- High Accuracy: Average prediction errors were remarkably low: 4.98% on Perlmutter and 9.38% on Vista.
- Scalability and Efficiency: The model remained accurate for configurations up to 20 billion parameters across 128 GPUs. Because it runs on CPUs and uses pre-profiled data, researchers can iterate through "what-if" scenarios in seconds without touching a single GPU.
- Hardware Variability: The GH200 system showed higher performance variability (up to 108%) compared to the A100 system, likely due to its heavier reliance on inter-node InfiniBand, making it more sensitive to network noise.
Conclusion
While the model is highly accurate, it still faces challenges from the stochastic nature of real-world network communication and the opaque optimizations of vendor libraries like NCCL. Future work will involve more sophisticated network modeling and direct integration into HPC job schedulers to help optimize resource allocation in real-time. This framework represents a significant step toward making the massive investment of LLM training more predictable and efficient.
Summary updated