Lumos: Efficient Performance Modeling and Estimation for Large-scale LLM Training

Mingyu Liang, Hiwot Tadese Kassa, Wenyin Fu, Brian Coutinho, Louis Feng, Christina Delimitrou

TL;DR

Training massive Large Language Models (LLMs) is incredibly complex and expensive. This paper introduces Lumos, a toolkit that uses detailed execution traces to build accurate performance models for LLM training. Lumos can predict training performance with very low error and allows researchers to explore "what-if" scenarios for different configurations without costly real-world experiments.

What Problem Does This Paper Address?

Training state-of-the-art LLMs like ChatGPT or LLaMA involves immense computational resources and a dizzying array of configuration choices. These choices span hardware, software, and intricate parallelism strategies (data, tensor, and pipeline parallelism). Finding the optimal combination is a monumental task, often requiring extensive, time-consuming, and expensive experimentation on actual hardware. Existing performance modeling tools struggle to capture the fine-grained complexities of modern LLM execution, especially the interplay between computation and communication in distributed settings. This makes it difficult to pinpoint bottlenecks and guide optimization efforts effectively.

Methods

Lumos tackles this challenge by employing a trace-driven performance modeling approach. The core idea is to:

  1. Collect Detailed Traces: Lumos leverages existing profiling tools within ML frameworks like PyTorch (specifically Kineto) to capture comprehensive runtime information. This includes operator calls, CUDA events, and GPU kernel executions, along with their dependencies. Crucially, this requires minimal code modification (just a few lines of hooks).
  2. Construct Execution Graphs: These raw traces are then processed to build a detailed, low-level execution graph. This graph represents tasks (CPU and GPU operations) and their dependencies, including intra-thread, inter-thread, CPU-to-GPU, and GPU-to-GPU relationships.
  3. Manipulate Graphs for "What-If" Scenarios: Lumos allows users to modify these execution graphs to represent new configurations. This includes adjusting parallelism strategies (data and pipeline) and even altering model architectures (e.g., number of layers, hidden size).
  4. Simulate and Predict: A simulator then uses these (original or modified) execution graphs to replay the execution and estimate performance. This allows for rapid evaluation of different configurations without needing to run them on physical hardware.

Datasets

The paper evaluates Lumos using NVIDIA's open-source GPT-3 implementation from the MLPerf Training Benchmarks. They tested four variants of GPT-3 with parameter counts ranging from 15 billion to 175 billion. The evaluation was conducted on a production ML cluster with up to 512 NVIDIA H100 GPUs. No new benchmarks were introduced; instead, they focused on evaluating Lumos against real-world training runs and a baseline tool (dPRO).

Key Insights and Ideas

  • Trace Granularity is Key: The paper highlights that accurately modeling LLM execution requires capturing fine-grained details, not just high-level metrics. Lumos's ability to model complex inter-stream dependencies and overlaps is a significant advantage.
  • "What-If" Simulation is a Game Changer: The ability to modify execution graphs and simulate performance for new configurations drastically reduces the cost and time associated with optimization. This democratizes the exploration of complex system designs.
  • Minimal Instrumentation, Maximum Impact: Lumos's reliance on existing profiling tools with minimal code changes makes it highly practical and user-friendly, avoiding the burden of extensive custom instrumentation.
  • dPRO's Limitations: The comparison with dPRO, a state-of-the-art trace-driven tool, reveals that dPRO struggles with complex LLM execution, often overestimating overlapped execution and underestimating total time, especially for larger models.

Key Results

  • High Replay Accuracy: Lumos achieved an average replay error of just 3.3% for iteration time across various GPT-3 models and configurations, significantly outperforming dPRO (average error of 14%).
  • Accurate Execution Breakdown: Lumos accurately reproduced detailed execution breakdowns (compute, communication, overlap) and SM utilization, providing deeper insights than dPRO.
  • Effective Configuration Prediction: Lumos demonstrated high accuracy in estimating performance for new configurations, including scaling data and pipeline parallelism (average error of 4.2% for simultaneous scaling) and modifying model architectures.

Limitations and Future Work

  • Focus on Timing: Lumos currently focuses on modeling and simulating execution timing. It does not estimate system-level metrics like FLOPS utilization, memory consumption, bandwidth, or energy efficiency.
  • Assumptions in Graph Manipulation: When modifying graphs, Lumos makes assumptions about how changes affect tasks (e.g., which kernels are impacted by hidden size changes).
  • Tensor Parallelism: Support for modifying tensor parallelism configurations is not yet included, as it's often fixed within a node due to high communication overhead.
  • Future Work: The authors plan to extend Lumos to include other system-level metrics and support tensor parallelism modifications. They also aim to adapt it to other ML frameworks beyond PyTorch.

Summary updated

BibTeX
@inproceedings{liang2025lumos,
  author = {Mingyu Liang and Hiwot Tadese Kassa and Wenyin Fu and Brian Coutinho and Louis Feng and Christina Delimitrou},
  title = {{Lumos: Efficient Performance Modeling and Estimation for Large-scale LLM Training}},
  booktitle = {MLSys},
  year = {2025},
  url = {https://openreview.net/forum?id=mwEOLauKI5},
}
Figure