Manuscript Offprint

arXiv:2608.27874

TerraceMoE: A Cost Model for Hierarchical MoE All-to-All Communication

Weicheng Xue, Bingqiang Wang, Li Yuan, Huihui Zhou, Yonghong Tian

Abstract

Hierarchical two-hop dispatch can reduce slow-fabric traffic in expert-parallel Mixture-of-Experts training, but it adds a second collective and an arrival-side operator chain. We present a cost model for screening that trade at the communication-call level, bounded by validation gates that withdraw a capability in code when they fail rather than reporting a caveat. At a reference geometry with 16 groups of 8 ranks, q=3q=3, H=2048H=2048, and 4096 tokens per rank, the corrected effective breakeven hierarchy ratio is 3.98 for the measured PyTorch arrival chain, 1.49 for a hypothetical fused target, and 1.10 at zero implementation overhead. These are ratio-only sensitivity results, not deployment predictions: platform A measures 1.03, platform B has no separated fast/slow measurement, and neither machine measured here reaches the hierarchical regime. Four communication-level corpora pass their gates; a drift probe and the step-level gate fail. The latter failure is enforced in code, so we make no training-throughput prediction. The enabling routing constraint fixes per-token fan-out and per-selected-group quota, while aggregate per-peer counts remain data-dependent. Its measured validation-loss cost is small but nonzero (+0.0034 nats); downstream equivalence is reported with incomplete estimator provenance and is therefore not independently reconstructible from the artifact. Code, calibration constants and the validation gates are at https://github.com/weich97/TerraceMoE-simulator.

1 Introduction

A cluster is summarised by its ratio of intra-group to inter-group bandwidth, the ratio is compared against a byte-counting threshold, and whether a hierarchical dispatch pays is taken to follow. The ratio is read off the fabric. It is not a property of the fabric. It moves with the scale-out bandwidth per accelerator a deployment buys, so one rack has two ratios and which one it has was purchased. The threshold it is compared against moves with how the arrival chain is written. And once a single fast domain holds the whole expert-parallel group, the comparison does not answer worse, it stops applying, which is where the hardware is going. Three ways for a deployment to be misclassified, none of them recoverable from the ratio a published comparison quotes.

Sparsity is how frontier language models buy parameter count without paying for it in arithmetic. A Mixture-of-Experts layer activates a few experts per token, so capacity grows with the expert count while arithmetic does not. Those parameters are spread across accelerators, so expert parallelism at that scale is the mechanism rather than an option. The bill arrives in the inner loop. Every routed token must reach its expert's device and come back, so an all-to-all sits in every MoE layer of every step, and in production it is often the largest single component of step time [23, 20]. Sparsity turns a memory problem into a communication problem.

A second trend has been reshaping the machine underneath. Interconnects have stopped being flat. Accelerators are packaged into high-bandwidth domains, a node and increasingly a rack, inside

*Correspondence: weich97@vt.edu which links are fast and uniform, and those domains are joined by a fabric several times slower; dozens of accelerators now share one domain on shipping hardware [42]. A collective crossing that boundary is priced almost entirely by the slow side, whatever the peak numbers inside the domain say.

The two trends meet at the dispatch collective, and the meeting suggests an obvious response. Slow-side traffic in a flat dispatch is redundant: a token whose experts land in several groups sends one copy per expert across the boundary where one copy per group would do. Send the deduplicated copy to a representative rank of each target group and let it scatter inside the group over the fast links. The shape is deployed rather than hypothetical [6, 42, 43].

It is not obviously right. Two hops pay two collective fixed costs where one hop paid one. The bytes taken off the slow side reappear on the fast side, cheaper but not free. A deduplicated message must also be unpacked on arrival into a local permutation, which costs real time and grows with hidden width. Whether the trade pays is therefore a property of a particular machine and a particular implementation, not of the idea, and the deciding terms are invisible in a topology diagram.

The field settles such questions by building both paths and measuring them [23, 20]. That is expensive, and asymmetric in a way that matters more than its size. A positive verdict is audited by the deployment that follows it: the system ships and step time says whether the restructuring paid. A negative verdict is never audited, because nobody builds what was rejected, and no measurement contradicts a system that does not exist. The answers that would save the most engineering are the ones nobody can check, which is why a practitioner is least willing to take one on trust.

Computing the verdict instead is not out of reach, because the raw material is cheap. The primitives a dispatch would be assembled from, a collective at a given message size, a gather over a given tensor shape, can each be timed directly on hardware that already exists; the composite, at a world size and a bandwidth ratio nobody in the room has, cannot. Composition, not measurement, is the hard step.

The models that perform it are not built to be disbelieved. MoE communication models price the deduplication and report the speedups they found [41, 24]; the simulators that precede this one validate by reporting an accuracy figure [18, 7, 38, 1]. An accuracy figure is a summary, and a summary cannot withdraw a capability: it says how a model did on average over a corpus its authors chose, not what it may no longer predict when a check fails. For a verdict of yes that gap is survivable, since the build finds out. For a verdict of no it is the whole problem. Section 10 places the model among its predecessors.

The two halves of the question come from different places. Cheap primitives set against an expensive build ask whether the composite can be predicted; the audit asymmetry demands more than an average behind the prediction. Can the verdict on a dispatch restructuring be predicted from microbenchmarks of the primitives it would be assembled from, for machines and geometries nobody has built, and can that prediction be made accountable enough that a verdict of no is actionable on its own?

At the communication-call level the first half clears the stated gates within the measured coverage; the second half is what makes that limited answer usable. Applied as a ratio sensitivity study, the model shows that hierarchy ratio does not determine the outcome on its own. Accountability comes from gates bound in code to what the model may output, so a failure removes a capability rather than adds a caveat. Two fail here and are left standing.

One end-to-end build of both paths supplies a validation instance. The communication-call model scores two-hop as a loss at the measured ratio, while the step-time bed agrees at five of the six geometries where a direction can be scored; the sixth is reported as a measured miss, scored against the criterion's refutation rule, itself post hoc and labeled as such, rather than averaged away

(Section 8). Because the step-level gate fails, this agreement is diagnostic rather than a licensed throughput prediction.

References (39)