A Complete Technical Breakdown of Large-Scale MoE Models

    This article explains why large-scale Mixture of Experts (MoE) architectures have become a key path for open-source models to close the gap with leading closed-source models. It covers the core trade-off between total parameters and activated parameters, the pre-training data scale and stage design, and three major architectural changes: multi-head latent attention with optimizer splitting, multi-token prediction, and sparse attention. It also outlines engineering trade-offs in training and inference, plus a practical checklist for developers.

    1. Why Large-Scale MoE Has Become the Key Path for Open-Source Models

    Over the past two years, the gap between open-source models and leading closed-source models has narrowed from a “generational gap” to the “same tier.” Understanding this shift requires understanding a fundamental tension: improvements in model capability have long depended on the simultaneous expansion of parameter count and data volume, yet inference cost is roughly proportional to the number of parameters that actually participate in each forward pass. With a dense architecture, doubling the parameters doubles both compute and memory overhead, which is hard to sustain in engineering practice.

    The Mixture of Experts (MoE) architecture is a direct response to this tension: it decouples the total parameter count from the number of parameters activated per pass. As a configuration commonly seen in public technical reports, a recent open-source model has roughly 744B total parameters, activates only about 40B per inference, uses 256 experts, and has 80 layers. Compared with the previous generation’s 355B total and 32B activated, the total parameter count doubled while activation grew only slightly. This means the model’s “knowledge capacity” expands significantly while compute per token grows relatively modestly.

    From a third-party evaluation perspective, this class of models has reached the 50-point range on a composite intelligence index for the first time, ranking first among open-source models. It also ranks near the top of open-source models in both text and code arenas, putting it in the same tier as leading overseas closed-source flagships. It is worth emphasizing that benchmark scores are only externally verifiable approximations; what truly determines real-world performance is the coordination of the training recipe, data quality, and inference engineering.

    2. Pre-Training Data Scale and Stage Design

    Parameter expansion must be matched by data expansion; otherwise, new parameters only learn redundant patterns. The pre-training corpus for this class of models is about 28.5T tokens, with roughly 27T used in the main pre-training stage and about 1.5T in a mid-training stage. This “main stage + mid stage” split is not a simple division but has clear engineering intent:

    • The main pre-training stage pursues coverage and breadth, learning general language structure, world knowledge, and code patterns.
    • The mid-training stage uses more strictly filtered data to strengthen target capabilities such as reasoning, code, and long context, while mitigating capability saturation at the end of the main stage.

    The takeaway for practitioners is that data mixture and stage scheduling often determine the final capability curve more than simply adding parameters.

    3. Breaking Down the Three Architectural Changes

    3.1 Attention Compression and Optimizer Splitting

    This class of models adopts a Multi-head Latent Attention (MLA) approach, the same lineage as mainstream long-context solutions. The core idea is to reduce the dimensionality of the KV cache through low-rank compression, significantly lowering memory usage and improving throughput in long-text scenarios. The general logic can be expressed as:

    1. # Pseudocode: general form of KV low-rank compression
    2. c = W_down @ h # compress into latent space
    3. k = W_up_k @ c
    4. v = W_up_v @ c
    5. score = softmax(q @ k.T / sqrt(d))
    6. out = score @ v

    A typical problem the team encountered during training is that the compressed latent representation couples with the momentum dimensions of the adaptive optimizer, causing parameter updates to be inconsistent in scale between the “compressed representation” and the “expanded representation,” leading to loss spikes early in training. A common solution is to manage optimizer states separately by parameter role, an approach known as “optimizer splitting” (Muon Split-style): use orthogonalization-based update rules for matrix-type weights, and maintain momentum and learning-rate scales separately for the compression and expansion paths, restoring consistency in update scale.

    Engineering notes:

    • After splitting, recalibrate the learning rate and weight decay for each parameter group.
    • Monitoring the ratio of gradient norm to update norm reveals anomalies earlier than watching loss alone.
    • Run ablations on the compression dimension to find the balance between memory savings and representational capacity.

    3.2 Multi-Token Prediction

    Multi-Token Prediction (MTP) trains the model to predict tokens at multiple future positions at once, rather than only the next token. The benefits are threefold: first, it provides a denser supervision signal and improves sample efficiency; second, it forces the representation layers to encode longer-range planning information, which is especially effective for code and reasoning tasks; third, the extra prediction heads obtained during training can be used for speculative decoding at inference time to reduce latency.

    1. # Pseudocode: multi-position prediction during training
    2. h = backbone(tokens)
    3. loss = 0
    4. for offset in range(1, K + 1):
    5. logits = head[offset](h)
    6. loss += cross_entropy(logits, targets[:, offset:])

    Note: a large K sharply increases task difficulty and can harm the main objective, so 2 to 3 is common in practice. If speculative decoding is enabled at inference, the draft head and the main head must share a consistent distribution; otherwise, a low acceptance rate can add overhead instead.

    3.3 Sparse Attention

    Sparse attention (DSA-style approaches) uses learnable routing or block selection so that each query interacts with only a subset of keys, reducing attention complexity from quadratic to near-linear. It is typically combined with the compressed attention above: compression reduces the cache size per token, while sparsity reduces the number of interactions between tokens.

    Three points must be watched in deployment: routing load balance (avoiding expert or block collapse), stability of long-text extrapolation, and consistency between training and inference kernels. Otherwise, a gap appears between good training metrics and poor online performance.

    4. Engineering Trade-offs in Training and Inference

    • Memory: total parameters determine the footprint of weights and optimizer states, activated parameters determine compute, and KV compression determines long-context feasibility; all three must be budgeted separately.
    • Throughput: sparsification and compression can improve throughput but depend on efficient kernels, so gains may be limited on general-purpose hardware.
    • Stability: large-scale MoE commonly suffers loss spikes, requiring layered defenses across data cleaning, initialization, optimizer splitting, and gradient clipping.
    • Deployment: inference services can run on a container platform, with logging services and monitoring/alerting systems tracking latency, acceptance rate, and routing distribution.

    5. A Practical Checklist for Developers

    1. First identify whether the bottleneck is memory, latency, or quality, then prioritize compression, sparsity, or multi-token prediction accordingly.
    2. Run small-scale ablations for any architectural change and keep a rollback baseline.
    3. Do not evaluate on a single leaderboard; cover real scenarios such as code, long context, and tool calling.
    4. Treat the training recipe and inference kernels as one system to avoid a disconnect between metrics and online performance.

    Overall, open-source models approach the composite intelligence of leading closed-source models not through a single trick but through the synchronized progress of four curves: parameters, data, architecture, and engineering. Understanding this combined logic is more valuable than memorizing a specific score.