Compute-Optimal Is Not Cluster-Optimal: Systems-Aware Scaling for Sparse Mixture-of-Experts

Soumajyoti Sarkar, Yuxin Tang, Sheng ZhaarXiv 2026

TL;DR

This paper demonstrates that traditional "compute-optimal" scaling laws fail in practice for sparse Mixture-of-Experts (MoE) models because they ignore actual hardware efficiency. The authors introduce MOSAIC, a framework that co-designs model architectures and distributed execution layouts by combining a new 4D scaling law with a calibrated hardware performance model. This approach shifts the optimization target from theoretical FLOPs to actual hardware-deliverable FLOPs, revealing realistic, cluster-specific optimal model configurations.

What Problem Does This Paper Address?

When training large language models (LLMs), researchers typically use scaling laws (like Chinchilla) to determine the optimal model size and token budget for a given compute budget. However, these laws operate on theoretical model FLOPs, assuming every floating-point operation costs the same and hardware utilization is constant.

For sparse Mixture-of-Experts (MoE) architectures, this assumption breaks down completely. MoEs decouple active parameters (computed per token) from total parameters (stored in memory) by routing tokens to specific "experts." Theoretical scaling laws suggest that MoEs should be made as sparse as possible to minimize loss. In reality, extreme sparsity introduces massive systems overheads—such as all-to-all communication bottlenecks across GPUs, memory pressure, and poor GPU kernel efficiency.

Consequently, a configuration that is theoretically "compute-optimal" can be disastrously slow on an actual cluster, failing to deliver the throughput required to complete training within a fixed wall-clock time budget.

The systems-aware scaling motivation for MOSAIC, showing how theoretical model FLOPs select an infeasible boundary sparsity, whereas MOSAIC finds a feasible interior optimum.

Methods

The authors propose MOSAIC (Model Optimization via Systems-Aware Training Co-design), which formulates architecture selection and distributed execution layout as a joint mixed-integer nonlinear program.

MOSAIC consists of two primary components:

  1. A G-augmented Joint Scaling Law: A new four-dimensional scaling law that models pretraining loss as a function of total parameters ($N_{tot}$), training tokens ($D$), routing sparsity ($S$), and an expert split factor ($G$). $G$ measures how finely a dense layer is partitioned into smaller experts, which helps capture the architectural nuances that affect both loss and system performance.
  2. ScalePlan (Performance Model): An operator-level analytical performance estimator. Instead of relying on simplistic roofline models, ScalePlan uses targeted microbenchmarks on the destination hardware to accurately predict Model FLOPs Utilization (MFU), memory footprint, and communication overheads across various parallel execution layouts (Tensor, Pipeline, Expert, Context, and Data Parallelism).
The MOSAIC workflow, mapping hardware inputs and cluster constraints to an optimal model configuration and parallel layout.

Datasets

The scaling laws were fitted using a dataset compiled from 150 from-scratch sparse MoE pretraining runs. All models were trained on the English portion of the mC4 dataset (a multilingual extension of the Colossal Clean Crawled Corpus) using a next-token-prediction language modeling objective. The dataset sweeps covered active parameters from 104 million to 2.7 billion, and total model sizes up to 79 billion parameters.

Key Insights and Ideas

  • The Boundary-Seeking Trap: Under an efficiency-agnostic theoretical FLOP budget, there is no "interior" optimal sparsity. The loss curve decreases monotonically as models get sparser, pushing the theoretical optimum to the absolute edge of the data support ($S_{max}$).
  • Hardware Constraints Force an Interior Optimum: When the constraint is switched to hardware-deliverable FLOPs (what a cluster can actually execute in a given timeframe), an interior optimal sparsity naturally emerges. The systems penalty of high sparsity (communication and memory overhead) acts as a natural regularizer.
  • The Role of the Expert Split Factor ($G$): Finer-grained experts (higher $G$) soften the scaling law's sparsity penalty at a fixed memory footprint, but they severely degrade MFU due to smaller GPU kernel tiles and increased communication.

Key Results

  • Accurate Performance Modeling: The ScalePlan performance model predicted actual hardware MFU with a mean absolute percentage error of under 15% across all validation sweeps.
  • Flipping the Loss Ordering: The authors validated MOSAIC's predictions by launching staged pretraining runs of up to 250 billion total parameters on an NVIDIA B200 GPU cluster. They confirmed that the configuration with the highest theoretical FLOPs was not the lowest-loss model. When plotted against actual hardware cost (wall-clock time), the loss ordering flipped exactly as MOSAIC predicted, proving that systems-aware configurations achieve lower final loss within the same hardware budget.

Limitations and Future Work

  • Conditionality: The precise optimal architectures returned by MOSAIC are highly dependent on the specific training stack (Megatron-Core in this case), hardware platform, and the chosen geometry scaling ladder.
  • Fixed Hyperparameters: The framework currently holds the global batch size fixed, meaning it does not yet co-optimize for algorithmic convergence properties related to batch size.
  • Simplistic Overlap Modeling: The performance model treats compute and communication costs largely additively. Future iterations will need to better simulate the complex computation/communication overlapping found in modern, highly optimized training stacks.

Summary updated

BibTeX
@misc{sarkar2026compute,
  author = {Soumajyoti Sarkar and Yuxin Tang and Sheng Zha},
  title = {{Compute-Optimal Is Not Cluster-Optimal: Systems-Aware Scaling for Sparse Mixture-of-Experts}},
  year = {2026},
  eprint = {2608.10605},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.10605},
}
Figure