TL;DR
Optimus is a distributed training system designed to accelerate Multimodal Large Language Models (MLLMs) by "filling" idle GPU periods—known as bubbles—with encoder computations. By using separate parallelization plans for encoders and LLMs and scheduling at the kernel level, Optimus achieves over a 20% speedup in training time for massive models like GPT-175B on thousands of GPUs.
What Problem Does This Paper Address?
Training state-of-the-art Multimodal Large Language Models (like GPT-4V or Gemini) is notoriously inefficient. These models combine specialized encoders (for images, audio, etc.) with a massive LLM backbone. To train them at scale, researchers use 3D Parallelism: a mix of Data (DP), Pipeline (PP), and Tensor (TP) parallelism.
However, this approach creates "bubbles"—periods where GPUs sit idle waiting for data from other stages or for communication to finish. In large-scale MLLM training, these bubbles can waste nearly 48% of GPU cycles. Existing frameworks treat the encoder and LLM as a single, unified pipeline, which leads to severe load imbalances because the LLM backbone is orders of magnitude larger than the encoders.
Methods
The authors introduce Optimus, which treats the encoder and LLM as distinct entities that can be scheduled independently to maximize hardware utilization. Its core innovations include:
- Separate Parallel Plans & Colocation: Standard systems give the whole model one parallel strategy. Optimus searches for different optimal 3D parallel plans for the encoder and the LLM. Crucially, it ensures that every GPU holds the model states for both, making it possible for any GPU to run encoder tasks during LLM "downtime."
- Dual-Stage Dependency Management: MLLMs have strict data dependencies (e.g., the encoder must finish the forward pass before the LLM can start). Optimus uses "local scheduling" to handle internal encoder timing and "global ordering" to ensure the encoder and LLM hand off data at exactly the right microbatch-level intervals.
- Kernel-Level Bubble Exploitation: Some bubbles, especially those caused by Tensor Parallelism communication, last less than a millisecond. A full encoder layer takes too long to run in these gaps. Optimus decomposes encoder layers into smaller kernels, allowing it to slot tiny pieces of computation into even the briefest idle windows.
Datasets
The paper evaluates Optimus using representative large-scale model configurations rather than specific public datasets, focusing on training throughput and efficiency:
- Encoders: Vision Transformers (ViT) ranging from 3B to 22B parameters.
- LLM Backbones: Llama-70B and GPT-175B.
- Infrastructure: A production cluster using up to 3,072 NVIDIA Hopper GPUs connected via NVLink and RDMA networks.
Key Insights and Ideas
- The "Aha" Moment: Encoders are computationally "cheap" but necessary for every step. By treating them as a "filler" workload for the LLM's unavoidable idle time, you can essentially get the encoder computation for "free."
- Granularity is King: Moving from layer-level scheduling to kernel-level scheduling is what allows Optimus to exploit the most frequent type of idle time (TP bubbles), which previous works ignored as being "too small" to use.
- Memory Trade-off: Colocating both encoder and LLM states on every GPU sounds memory-intensive, but because encoders are relatively small compared to the LLM backbone, the actual memory overhead is surprisingly manageable (less than 12%).
Key Results
- Significant Speedups: In a production environment with 3,072 GPUs, Optimus accelerated the training of a ViT-22B + GPT-175B model by 20.5% to 21.3% compared to state-of-the-art baselines like Megatron-LM.
- Improved Utilization: Optimus maintained a stable Model Flops Utilization (MFU) of ~34.6%, whereas traditional baselines saw their efficiency drop as they scaled to more GPUs.
- Scalability: The system scales exceptionally well; as the number of GPUs increases, the "bubble ratio" typically grows, giving Optimus even more opportunities to hide encoder work.
Limitations and Future Work
- Static vs. Dynamic Scheduling: Optimus currently relies on offline profiling to build its schedule. In the real world, "jitter" (small fluctuations in execution time) can occur. The authors suggest "Online Scheduling" as a future direction to adjust to these fluctuations in real-time.
- Complex Model Graphs: The current design assumes a standard "Encoders followed by LLM" architecture. Future work could extend this to more complex, multi-branch computation graphs where data flows back and forth between modalities multiple times.
- Optimizer Constraints: The authors noted that certain "Zero-bubble" pipeline techniques are difficult to integrate because they require changes to the optimizer that might affect the convergence of multimodal models. Finding a way to combine these approaches remains an open challenge.
Summary updated