MoE Sparse Scaling: Hardware Ceilings and How to Break Through Them

    Mixture-of-Experts (MoE) architectures let large language models grow their total parameter count while keeping per-token compute proportional only to the activated experts. But the achievable sparsity of an MoE model is not decided by algorithms alone; it is pre-bounded by hardware interconnect topology. This article works from hardware up to explain MoE communication costs, the physical ceiling created by rack boundaries, the practical limits of sparsity, and the role of batch size as a key lever. It then translates these constraints into a concrete engineering checklist and platform-level guidance on topology-aware scheduling and observability. Engineers tuning MoE training or inference will learn why packing an expert layer inside a single scale-up domain often matters more than any learning-rate change, and how to diagnose slow all-to-all communication.

    Introduction: Half of MoE’s Ceiling Is Written into the Hardware

    Over the past few years, large language models have kept growing in parameter count, while training and inference costs remain stubbornly high. In dense models, compute grows in step with parameter count, so simply “making the model bigger” delivers diminishing returns. The Mixture-of-Experts (MoE) architecture has therefore become a mainstream choice: the model has a very large total parameter count, but each token passes through only a few experts, so compute scales with the activated parameters. Sparsity brings efficiency, but it also pushes new problems to the forefront — how to partition experts and place them across devices, and how to route tokens efficiently to the correct experts.

    One frequently underestimated fact is this: the upper limit of MoE sparsity is not determined by algorithms alone. It is pre-drawn by the hardware interconnect topology. Within a rack you typically find a high-bandwidth interconnect domain spanning dozens of accelerators (the industry often calls this a scale-up domain). Once traffic crosses the rack boundary, communication performance drops by an order of magnitude. This drop looks like it merely makes things “a bit slower,” but in practice it directly determines how large an expert layer can be and how fast inference can run.

    This article starts from hardware topology, then works layer by layer through MoE communication costs, the physical ceiling formed by rack boundaries, the practical boundaries of sparsity, and batch size as a key variable, before closing with an actionable engineering optimization checklist.

    1. Start with the Hardware: The Layered Structure of Scale-Up and Scale-Out Domains

    Modern large-model training and inference run on clusters built from large numbers of accelerators. In terms of interconnect, these clusters almost universally exhibit a two-tier structure:

    • Within a rack (scale-up domain): Accelerators are joined by dedicated high-bandwidth, low-latency interconnect links into a relatively closed “high-bandwidth island.” Any two cards in the domain can connect in near-peer, direct fashion, making this suitable for fine-grained, high-frequency, high-volume card-to-card communication. Vendors use different generational names for the interconnect bus, and each generation typically roughly doubles bandwidth. Many racks can hold 72 accelerators under the latest interconnect generation (the previous generation typically held 8–16). This is precisely why “a rack” becomes a critical boundary.
    • Across racks (scale-out domain): Different racks are connected via the data center network, usually a multi-tier switched fabric based on standard Ethernet or dedicated RDMA networking (such as a leaf-spine architecture). Its advantages are elastic scaling and cost efficiency, but the bandwidth of a single link is typically far lower than intra-rack interconnect, and end-to-end latency is higher.
    1. ┌──────────────── Rack R1 (scale-up domain) ────────────────┐
    2. │ [card0]──[card1]── … ──[card70]──[card71] │
    3. │ high bandwidth, low latency, near all-to-all │
    4. └───────────────────────┬─────────────────────────────────────┘
    5. │ inter-rack link: ~1/8 of intra-rack BW
    6. │ higher latency, prone to congestion
    7. │ when many racks run concurrently
    8. ┌───────────────────────┴─────────────────────────────────────┐
    9. │ [card0]──[card1]── … ──[card70]──[card71] Rack R2 │
    10. │ │
    11. └─────────────────────────────────────────────────────────────┘

    A note on the “roughly 8× slower” figure: This is an approximate ratio of intra-rack to inter-rack bandwidth — an order-of-magnitude estimate for a specific interconnect generation and typical topology. It varies by vendor, generation, and switching tier. Calibrate it against your actual topology and measured data rather than treating it as a fixed constant.

    Topology dictates the efficiency of communication primitives. The “ring” algorithm common in collective communication libraries arranges participating devices into a logical ring, where each rank exchanges data only with its predecessor and successor over multiple steps. Two easily confused primitives are worth distinguishing:

    • all-reduce: The ring implementation is typically a two-phase “reduce-scatter + all-gather,” after which every card holds the same reduced result.
    • all-to-all: Every card sends its own distinct data shard to every other card; it is essentially a distributed matrix transpose.

    The two have different semantics — all-to-all is not a special case of all-reduce. What they share is this: when the participating devices sit in the same high-bandwidth domain, every step is a direct in-domain connection with low latency and high aggregate bandwidth. But once the ring or the send-receive relationships cross a rack boundary, data must repeatedly traverse the inter-rack link — roughly 8× lower in bandwidth — and is prone to step-timing mismatches where “one step sends and many steps wait.” A single communication task can often absorb this through link redundancy, but when multiple parallel tasks share the network, the mismatch quickly accumulates into congestion.

    This yields a simple principle for parallel strategy design: confine high-frequency communication dimensions within the rack as much as possible, and place only low-frequency communication outside it.

    2. Why MoE Is the Most Communication-Hungry Architecture

    2.1 Sparse Activation: Trading Total Parameters for Compute

    The feed-forward network (FFN) in a Transformer typically holds the majority of the model’s parameters. MoE replaces it with N structurally identical expert networks and introduces a router that scores each token and selects the top-k highest-scoring experts (Top-K routing). Each token is computed only within those k experts, and the outputs are combined as a routing-weighted sum. Let E be the parameter count of each expert; with k experts activated, the FFN parameter count is about kE, while the compute is only k/N of a dense FFN.

    1. def moe_layer(tokens, router, experts, top_k=2):
    2. # tokens: [T, d] T = batch_size × seq_len
    3. scores, idx = router(tokens) # [T, N] -> [T, k]
    4. weights, idx = top_k_softmax(scores, top_k) # normalized routing weights
    5. # 1) Sort and pack by target expert to form each expert's input
    6. order = argsort(idx)
    7. packed, splits = pack(tokens, order) # splits: tokens per expert
    8. # 2) First all-to-all: send tokens to devices holding the target experts
    9. recv, recv_splits = all_to_all_v(packed, splits)
    10. # 3) Each device computes with its local experts (with expert parallelism,
    11. # different cards hold different experts)
    12. local_out = run_local_experts(recv, recv_splits)
    13. # 4) Second all-to-all: return results to the devices the tokens came from
    14. ret = all_to_all_v(local_out, inverse_splits(recv_splits))
    15. # 5) Merge by routing weights and add the residual
    16. return tokens + scatter_weighted_sum(ret, order, weights)

    In real frameworks, dispatch/combine are often fused into a single communication operator with compute-communication overlap enabled. But the fundamental structure — “send out, compute, receive back” — stays the same.

    2.2 Expert Parallelism and all-to-all: A Natural Fit for Intra-Rack Topology

    N experts cannot all fit on a single card. The most natural partition is expert parallelism (EP): different experts are distributed across different GPUs, and each card stores only a subset of the expert weights.

    This raises an essential problem. Under data parallelism, the same batch flows through all of a card’s parameters, so communication is a regular all-reduce. In MoE, however, each token’s target expert is decided dynamically by the router. Tokens produced on card 0 may need to go to card 37, and tokens from card 63 may need to come to card 0 — nearly any pair of cards exchanges data. This is a classic all-to-all communication pattern.

    Intra-rack high-bandwidth interconnect happens to provide a near all-to-all direct topology that naturally matches the all-to-all pattern. As long as all experts reside within the same rack, both all-to-all operations in each MoE layer can complete within the scale-up domain — single-hop, direct, low-latency, with high aggregate bandwidth.

    2.3 When Experts Spread Beyond the Rack

    When the number of experts grows beyond what a single rack can hold, some experts must be placed on a second rack. At that point, routing no longer “respects topology”: a token whose target expert happens to be on another rack must send that traffic over the inter-rack network, which is roughly 8× slower. Let r be the fraction of cross-rack traffic; the effective bandwidth of the bottleneck link is about B/(1+7r). At r=0.5, effective bandwidth drops to roughly 1/4.5; at r=1 (experts fully spread), it drops to about 1/8. As a rough estimate, if about half the traffic must cross racks, the completion time of a single all-to-all becomes roughly 4.5× longer.

    And this is only the “ideal case.” The MoE layer has strict data dependencies: computation cannot begin until all experts have received their tokens, and the next layer cannot start until all results return. There is an inherent global synchronization point. A single instance of congestion or jitter on the inter-rack link forces the entire layer — even the whole forward pass — to “wait for the slowest card.” In practice, the effective interconnect bandwidth of MoE models is often far below the theoretical bandwidth, and the cross-rack amplification is more severe than the paper estimate suggests.

    This leads to a key conclusion: how many accelerators a rack can hold, and how fast the intra-domain interconnect is, directly limits how large a single expert layer can be. And the scale of the expert layer largely determines how sparse an MoE can be and how large its total parameter count can grow.

    3. An Industry View from the Hardware Angle: Why Super-Large Scale-Up Domains Matter

    A common question in the industry is: why do some vendors using dedicated accelerators seem to have achieved earlier success in large-model pretraining? Setting aside algorithms, data, and team execution, there is one structurally important difference at the hardware level worth attention.

    Dedicated accelerators generally follow a co-design philosophy, optimizing the chip, package, rack, and even the data center as a whole. Take a certain class of dedicated AI accelerator as an example: its rack uses liquid cooling and joins dozens of chips through high-speed internal interconnect into an extra-large scale-up domain. This means an extremely high fraction of tokens in an MoE can be dispatched and gathered within a single domain, barely touching the inter-rack network.

    By contrast, clusters based on general-purpose accelerators have long relied mainly on 8-card-per-rack intra-rack interconnect, so cross-card communication must cross the rack boundary, with a clear bandwidth gap. The result is that at the same sparsity level, all-to-all on a general-purpose cluster is more easily dragged down by the inter-rack network. To maintain inference efficiency, one can only lower the sparsity (fewer activated or total experts), which caps the model’s representational ceiling.

    Over the past two years, the general-purpose accelerator ecosystem has also moved toward a “rack-level” approach: built on the latest high-speed interconnect, a single rack can hold dozens or even over a hundred accelerators in a unified, co-addressed scale-up domain, narrowing this gap.

    It is worth noting that this is merely a neutral reading of engineering constraints. The advantage of dedicated accelerators ultimately depends on the specific interconnect specs, rack topology, software-stack maturity, and target workloads, and it does not necessarily lead in all scenarios; algorithms, data, and engineering know-how in other dimensions matter just as much. The point here is more of a reminder: when selecting and deploying models, interconnect topology matters as much as peak compute.

    4. Sparsity Isn’t Better the Higher It Goes

    Since sparsity appears to add parameters “for free,” why not expand the number of experts without limit and push the activation ratio extremely low? There are three reasons:

    1. Routing quality sets the ceiling. The more experts and the smaller top_k, the more critical routing decisions become. A single wrong route doesn’t just produce a slightly degraded result — the token enters an expert that was almost never adequately trained, and output quality drops noticeably. The industry has developed fine-grained expert partitioning and shared experts in response: experts are split finer and only a few are activated per pass, while shared experts carry general knowledge so the router can focus on distinguishing “specialized” capabilities.
    2. Load balancing must be explicitly optimized. The router naturally favors “stronger” experts, creating a Matthew effect where a few experts become overloaded and most sit idle. Common approaches add a load-balancing auxiliary loss or use an “auxiliary-loss-free” balancing strategy. Even so, under small batches, the randomness of token assignment still causes significant load jitter (see Section 6.4).
    3. Diminishing returns and robustness. Sparse models may achieve lower perplexity on the training distribution than dense models of the same activated size, but during post-training stages like supervised fine-tuning and reinforcement learning, only activated experts receive gradient updates, which can produce “under-trained experts.” Past a certain point, further increases in sparsity narrow the quality gains while training and inference complexity keeps rising.

    There is also an easily overlooked constraint: memory bandwidth. During decoding (token-by-token generation), each expert processes only a few tokens per step yet must read its full weights completely, and reading expert weights often becomes the dominant cost. The more experts and the smaller each expert, the higher the fixed overhead of routing and communication. So designing sparsity is essentially a multi-objective tradeoff among quality, throughput, and hardware constraints.

    5. Rethinking Data Scale

    Scaling-law research reveals an empirical rule: under a fixed compute budget, there is a “compute-optimal” ratio between model parameters and training tokens, with common findings landing at roughly 20 training tokens per parameter. By contrast, the flagship versions of top models are pretrained on data volumes up to about a hundred times that theoretical optimum. This deliberate “over-training” is far from wasteful; it rests on three considerations:

    • Inference cost is the real long-term cost. Once trained, a model is called repeatedly across countless inferences. Packing more knowledge into parameters and shrinking the activated size makes each inference cheaper — trading a one-time training investment for long-term inference savings.
    • Small models can’t absorb high-quality data. Capability gains don’t scale linearly with data volume. To keep absorbing new data, a small model often depends on high-quality filtering, curriculum-style data scheduling, and even annealing strategies, and it struggles to “digest” all the data. Larger models gain more from the same data, further justifying over-training.
    • Scaling dividends. MoE naturally fits ultra-large-scale parallel training and can organize more accelerators more efficiently. More critically, when batch size is large enough, both model statistics and parallel efficiency improve (see the next section).

    Put differently, the joint design of model scale and data scale is ultimately constrained by hardware efficiency, which brings us to the key variable of this article: batch size.

    6. The Key Variable: Batch Size

    If you could pick a single variable to explain “why the same MoE model is efficient under one hardware configuration and inefficient under another,” the answer is batch size. Here’s the conclusion up front: a larger batch pushes expert GEMMs closer to compute-bound, makes routing more balanced, and makes communication easier to hide behind compute — so MoE throughput rises. But once expert computation has entered the compute-bound regime, or during decoding (token-by-token generation), the benefit of increasing batch size further diminishes quickly. Here’s the breakdown.

    6.1 Under an Ideal Model, the Compute-to-Communication Ratio Is Independent of Batch Size

    Let T be the total number of tokens, d the hidden dimension, d_ff the FFN intermediate dimension per expert, k the number of activated experts, and b the bytes per data element. In a single MoE layer:

    • Communication volume: dispatch and combine each transfer T·d elements, totaling 2Tdb bytes (excluding routing metadata, alignment padding, and other overhead).
    • Compute volume: about 4kTdd_ff floating-point operations.

    Their ratio depends only on model structure and hardware bandwidth — not on batch size:

    1. communication / compute = 2·T·d·b / (4·k·T·d·d_ff)
    2. = b / (2·k·d_ff) (unit: bytes/FLOP)

    Plugging in k=2, d_ff=1536, b=2 (BF16) gives about 1/3072 bytes/FLOP. Converting to time (single-card B≈900 GB/s, P≈1 PFLOPS), communication time is about 0.36× the expert compute time — a compute/communication ratio of roughly 2.8 (see 6.3). This means that, under an ideal single-domain, fully-overlapped setup, all-to-all communication time can be mostly hidden behind expert compute. The reason real-world communication overhead is far higher than the paper value is precisely that the ideal model doesn’t cover the following factors: expert GEMMs being memory-bound at small batch sizes (6.2), micro-batches too small for communication to be hidden (6.3), and the 8× bandwidth drop across racks (Section 2).

    6.2 Tokens per Expert Determine Expert GEMM Efficiency

    Expert computation is essentially a set of grouped matrix multiplications (Grouped GEMM). One FFN matrix multiply has shape [M, d] × [d, d_ff], where M is the number of tokens routed to that expert. Estimating by “bytes that must be read” (with weight reads dominant, b=2), its arithmetic intensity is approximately:

    1. I ≈ 2·M·d·d_ff / (2·d·d_ff) ≈ M

    For the GEMM to enter the compute-bound regime, arithmetic intensity must be at least the hardware’s compute/bandwidth balance point (single-card peak 1 PFLOPS ÷ HBM 2 TB/s ≈ 500 FLOP/byte). Accordingly, M needs to reach the hundreds range for the expert GEMM to fully use the compute; when M is too small, much of the time is spent re-reading expert weights and the accelerator’s compute sits largely idle.

    And M depends on batch size: M ≈ T·k/N (N is the total number of experts). The relationship isn’t strictly linear, because real implementations often pad to a capacity limit (capacity factor) — the effective M can exceed the theoretical mean while introducing padding waste.

    The table below is an illustrative estimate assuming N=256, k=2, single-card peak of about 1 PFLOPS, HBM bandwidth of about 2 TB/s, counting only the two forward matrix multiplies:

    Batch size (T) Tokens per expert M Arithmetic intensity (≈M) Compute utilization ceiling (≈I/500) Expert GEMM state
    1024 8 ~8 ~1.6% severely memory-bound, compute nearly idle
    8192 64 ~64 ~12.8% memory-bound
    32768 256 ~256 ~51% approaching compute-bound
    65536 512 ~512 ~100% (capped) compute-bound

    Note: the “compute utilization ceiling” column refers to the ratio of ideal compute time to actual time when the GEMM is memory-bound — the theoretical ceiling obtained by dividing I by the hardware’s “compute/bandwidth” balance point (here roughly M/500), equivalent to the GEMM’s MFU upper bound. It is not a measured throughput utilization. I≈M is an approximation under “weight reads dominant, b=2”; the data is for order-of-magnitude illustration, and actual results also depend on data reuse, kernel fusion strategy, and so on.

    6.3 Pipeline Filling Bubbles Also Scale with Batch Size

    When introducing pipeline parallelism or micro-batch splitting, whether communication can be hidden behind compute is closely tied to the number of tokens a single card processes at once (m). For a single MoE layer:

    • dispatch time: t_d = m·d·b / B
    • combine time: t_c = m·d·b / B
    • expert compute time: t_e = 4·k·m·d·d_ff / P (P is single-card compute)

    The single-card “compute/communication” ratio is as follows. Increasing batch size is essentially moving rightward along the horizontal axis of the same Roofline (arithmetic-intensity–performance) curve:

    1. single-card compute/comm ratio = t_e / (t_d + t_c)
    2. = (2·k·d_ff·B) / (P·b)

    Plugging in k=2, d_ff=1536, B=900 GB/s, P≈1 PFLOPS, b=2:

    1. = (2 × 2 × 1536 × 900×10⁹) / (1×10¹⁵ × 2)
    2. = 5.53×10¹⁵ / 2×10¹⁵
    3. ≈ 2.8

    (Notes: B is the effective bidirectional bandwidth available within a single card’s scale-up domain, P is the single-card BF16 peak compute, b is bytes per element.) In other words, within a single micro-batch, expert compute time is about 2.8× the sum of the two communications. As long as compute and communication can be sufficiently overlapped and the micro-batch isn’t split too finely, communication can be hidden behind compute; once the split is too fine (m too small), single-card compute time shrinks, communication can no longer be fully hidden, and pipeline bubbles grow.

    6.4 Batch Size Affects Routing Balance and Parallel Efficiency

    • Stability of routing statistics: Routing can be approximated as a multinomial distribution where each item has probability 1/N. Among N experts, the expected load of the most-loaded expert is about T·k/N + √(2·(T·k/N)·lnN). At N=256, the max/mean load ratio is roughly:

      • T=4096: about 1.8 (equivalent to 56% of theoretical peak);
      • T=8192: about 1.5 (about 66%);
      • T=32768: about 1.25 (about 80%).

      Because the MoE layer has a synchronization point, the slowest expert determines the whole layer’s time. A larger batch means better load balance and smaller waiting-induced “bubbles.”

    • Parallel efficiency: A larger compute graph makes it easier to fill the accelerator’s pipeline stages, reducing the share of fixed overheads like kernel launch, synchronization, and reduction.
    • Parallel strategy: When the batch is large enough, expert weights can be tensor-parallel sharded across multiple cards, further reducing per-card memory pressure and raising single-card compute density.

    6.5 Why These Conclusions Don’t Apply to the Decoding Stage

    Decoding produces only one token per sequence per step, and each MoE layer’s communication volume shrinks dramatically compared to training, becoming dominated by kernel launch, synchronization, and network round-trip latency. Here the bottleneck is no longer bandwidth but latency and expert weight reads, so simply increasing batch size yields diminishing returns quickly. Batch size as the key variable applies mainly to pretraining and large-scale parallel training contexts.

    6.6 Validating with the “Amplified 8× Gap”

    Consider a pure MoE model (ignoring attention for now), with L decoder layers and a training FLOPs utilization (MFU) of u. At a cross-rack fraction r, the bottleneck link’s effective bandwidth is about B/(1+7r). Using the training “6ND” convention to estimate compute per token: training FLOPs ≈ 6·N_active, where the activated parameter count N_active ≈ 2·k·L·d·d_ff (each expert’s FFN has two matrices totaling about 2·d·d_ff parameters). Cluster training throughput is thus:

    1. throughput (tokens/s) ≈ u · 72 · P / (12 · k · L · d · d_ff)
    2. r=0 -> 1× (about 1.8M)
    3. r=0.5 -> 4.5× (about 400K)
    4. r=1 -> 8× (about 225K)

    Plugging in 72 cards, 1 PFLOPS per card, L=61, d=7168, d_ff=1536, k=2, MFU=40%:

    1. numerator = 0.4 × 72 × 1×10¹⁵ ≈ 2.88×10¹⁶ FLOP/s
    2. denominator = 12 × 2 × 61 × 7168 × 1536 ≈ 1.61×10¹⁰ FLOP/token
    3. throughput ≈ 2.88×10¹⁶ / 1.61×10¹⁰ ≈ 1.8×10⁶ ≈ 1.8M tokens/s

    So with no cross-rack traffic, ideal training throughput is about 1.8M tokens/s; at a cross-rack fraction of half it drops to about 400K, and when experts are fully spread only about 225K (all are order-of-magnitude estimates of training throughput, not measurements from specific hardware). These numbers illustrate two points: first, the 8× bandwidth gap gets amplified into a throughput gap on large-scale MoE; second, as long as you confine the expert layer within a single scale-up domain (r→0), this penalty can essentially be eliminated.

    7. Engineering Optimization Checklist

    7.1 Topology-Aware Expert Placement

    • Co-occurrence matrix analysis: Analyze routing logs to build an expert co-occurrence matrix (how often two experts are selected by the same token), and place high-co-occurrence experts in the same rack to reduce the cross-rack traffic fraction r.
    • Placement under load-balancing constraints: The placement algorithm must simultaneously satisfy “balanced expert count per card” and “minimal co-occurrence cost.” This can be modeled as a capacity-constrained graph partitioning problem and solved with heuristics or clustering.
    • Rolling re-placement: Routing distributions evolve during training, so periodically (e.g., every few steps) re-place experts based on sliding-window statistics.

    7.2 Hierarchical Communication and Expert Grouping

    • Hierarchical all-to-all: First aggregate locally within the rack (e.g., reduce-scatter), then have a designated representative card per rack exchange across racks, then distribute within the rack. Cross-rack traffic drops from O(T·d) to O(R·d) (R is the number of racks), at the cost of one extra round of intra-rack communication and synchronization.
    • Hierarchical MoE: Group experts so tokens route within a group first and across groups only when necessary. Routing decisions can also be hierarchical: the gating network picks a group first, then picks an expert within it, reducing the number of participants in the global all-to-all.

    7.3 Compute-Communication Overlap and Pipeline Scheduling

    • Overlap communication with compute: Overlap dispatch with expert compute and combine with backpropagation, hiding communication inside compute windows.
    • Fine-grained pipelining: Split micro-batches to the granularity that “just barely hides communication,” avoiding bubbles from splits that are too fine.
    • Asynchronous routing: Allow some tokens to enter already-known experts before routing results are fully ready, shortening the critical path.

    7.4 Hybrid Parallelism Strategy

    • Tensor parallelism (TP) within the rack: TP has the highest communication frequency and must be confined to the scale-up domain.
    • Expert parallelism (EP) confined to the rack where possible: When EP scale doesn’t exceed the number of cards a single domain can hold, cross-rack traffic is zero.
    • Pipeline parallelism (PP) across racks: PP is point-to-point communication with small data volume and low frequency, making it suitable for crossing racks.
    • Data parallelism (DP) gradient sync: With sharded data parallelism, gradient synchronization can overlap with backward compute; across racks, prefer hierarchical all-reduce (reduce within the rack first, then exchange across racks).

    7.5 Communication Compression and Quantization

    • Low-precision transmission: dispatch/combine can use BF16 or even FP8, halving memory and bandwidth; compress routing metadata to int32.
    • Expert weight quantization: Quantize weights to lower precision to reduce weight-read bandwidth, which is especially critical for the decoding stage.
    • Sparse transmission: Transmit only non-zero / above-threshold activations (requires reliable sparse communication primitives) to further compress communication volume.

    7.6 System-Level Inference Optimizations

    • Dynamic batching: Merge tokens from multiple requests into one batch to raise the number of tokens per expert M.
    • Prefix caching and KV reuse: Reduce redundant computation and indirectly lower the frequency of expert weight access.
    • Expert caching and tiered loading: Keep hot experts resident in memory and swap cold experts in and out by access frequency, paired with accurate prefetching to avoid thrashing.

    7.7 Pre-Release Checklist

    Before pushing the above optimizations to production, confirm each item:

    • Cross-rack traffic fraction r: Is it pushed to an acceptable range (ideally near 0)?
    • Tokens per expert M: Does it reach the hundreds range, pushing expert GEMMs into the compute-bound regime?
    • Parallelism constraints: Are TP and EP strictly confined to the scale-up domain, with only PP/DP gradient sync crossing racks?
    • all-to-all tail latency: Is P99 stable, with no periodic jitter?
    • Expert load skew: Is the max/mean load ratio controlled (e.g., <1.5)?
    • Rollback plan: Do changes like RDMA lossless networking and expert re-placement have canary and rollback capabilities?

    8. Down to the Platform: Topology-Aware Scheduling and Observability

    For the optimizations above to actually take effect, support at the platform layer is essential:

    • Topology-aware scheduling: The scheduler should be aware of the three-tier topology of rack, node, and accelerator, and constrain the same parallel group within the same scale-up domain where possible. On a container platform, this can be achieved through node affinity, topology constraints, and NUMA alignment. Job orchestration should support gang scheduling to avoid resource idling caused by some cards being ready while others wait.
    • RDMA networking and congestion control: When racks use RDMA networking, lossless mechanisms like PFC/ECN are usually enabled. But be especially careful: misconfiguration (e.g., unreasonable PFC watermarks or ECN thresholds) can amplify small-scale congestion into network-wide backpressure, even causing head-of-line blocking or deadlock, and actually drag down overall throughput. Validate in a canary environment first and ramp up gradually, keep a one-click rollback switch, and closely monitor P99 tail latency, packet loss, and retransmission counts before going to full rollout.
    • Observability: Focus on collecting per-card/per-rack communication volume, cross-rack traffic fraction, all-to-all tail latency (P99), tokens-per-expert distribution, MFU, and other metrics, tracking them continuously via logging and monitoring/alerting. The value of observability is that when throughput drops, you can quickly tell whether it’s “cross-rack traffic rising” or “routing imbalance.”
    • Capacity planning: Plan cluster size around “the expert-layer scale a single domain can hold,” avoiding blindly stacking cards and letting cross-rack traffic spiral out of control.

    9. Conclusion

    Large-model design has never been a purely algorithmic problem. MoE trades sparsity for scale but pushes communication pressure to the extreme; and the bandwidth chasm between intra-rack and inter-rack draws a physical ceiling on that sparsity. Understanding this explains many seemingly coincidental industry phenomena and guides more pragmatic engineering decisions:

    1. Topology first: Before deploying, compute whether the expert layer fits inside a single rack — this often determines throughput more than tuning the learning rate.
    2. Batch size is the lever: On the training side, use a large batch to push expert GEMMs into the compute-bound regime; on the inference side, use dynamic batching to raise M.
    3. Match sparsity to hardware: Higher sparsity isn’t always better; design it jointly with interconnect bandwidth, memory capacity, and routing quality.
    4. Platform capability is the amplifier: Topology-aware scheduling, RDMA network tuning, and end-to-end observability turn theoretical ceilings into actual throughput.

    Once you can answer the question “how many experts fit in one rack,” you’ve also answered half of “how far your model can go.”

    Quick-Reference FAQ

    • How do I choose MoE expert placement? First run co-occurrence analysis, place high-co-occurrence experts in the same rack, and minimize cross-rack traffic r while keeping per-card load balanced.
    • How do I know whether I need to cross racks? First compute whether the expert layer fits within a single scale-up domain; if it fits, r≈0, and if not, use hierarchical all-to-all to reduce cross-rack traffic.
    • How do I troubleshoot slow all-to-all? Check in order: is tokens-per-expert M too small (memory-bound)? Are micro-batches split too finely (communication can’t be hidden)? Has the cross-rack traffic fraction r risen? Is RDMA dropping packets or retransmitting?
    • How do I do topology-aware scheduling? Make the scheduler aware of the three-tier rack/node/accelerator topology, constrain the same parallel group (especially TP and EP) within the same scale-up domain, and enable gang scheduling to avoid resource idling.