A Complete Technical Breakdown of Ultra-Large-Scale MoE Models

    This article breaks down how ultra-large-scale Mixture-of-Experts (MoE) models decouple total parameters from activated parameters, using a representative model with roughly 744B total parameters and about 40B activated per inference. It explains three key architectural choices—Multi-head Latent Attention (MLA) with per-head orthogonalization, Multi-Token Prediction, and sparse attention—along with the engineering trade-offs behind each. It closes with a reusable path from evaluation reports to production deployment, covering cost modeling, parallelism, inference optimization, and data strategy.

    1. Why “Large Total Parameters, Small Activated Parameters” Became the Mainstream

    The evolution of ultra-large-scale Mixture-of-Experts (MoE) models over the past two years is, at its core, an answer to a question that spans both engineering and algorithms: how do you keep gaining general capability under a limited compute budget? For traditional dense models, capability gains are almost linearly tied to parameter count, so training and inference costs rise in lockstep. MoE decouples “knowledge capacity” from “compute per pass”—total parameters determine how much knowledge the model can hold, while activated parameters determine the actual compute cost paid for each token.

    The sample figures from the source material are representative: the new-generation model has roughly 744B total parameters, activates only about 40B per inference, uses 256 experts across 80 layers. Compared with the previous generation’s 355B total and 32B activated, the parameter scale doubled while the activated scale grew only slightly. The pre-training corpus expanded from 23T tokens to 28.5T tokens, with about 27T used for pre-training and 1.5T for mid-training. These numbers carry three engineering implications:

    • Capacity growth is mainly stored in expert weights, while per-token compute growth is deliberately suppressed, keeping inference costs controllable;
    • Data scale is still expanding, but the increment goes more into the “mid-training” stage, used for capability shaping rather than pure memorization;
    • On evaluations, the open-source model scored 50 on a mainstream general capability index for the first time, ranked first among open-source models in both text and code arenas, and sits in the same tier as leading overseas closed-source models overall.

    The scores only indicate relative position. What developers should really pay attention to is the architectural thinking behind them.

    2. Architectural Change One: Multi-Head Latent Attention and Per-Head Orthogonalization

    2.1 Trading Low-Rank Compression for Memory Bandwidth

    The new-generation model uses a Multi-head Latent Attention (MLA) mechanism, which shares the same lineage as existing low-rank KV compression approaches in the industry. The core idea is to stop caching the full Key/Value. Instead, the KV is projected into a low-dimensional latent space; during inference only this compressed representation is kept, and it is projected back up when needed. The payoff is a significant reduction in KV cache size for long-context scenarios, easing both memory footprint and bandwidth pressure. Throughput gains here are often more noticeable than from compute-only optimizations.

    Schematically, the cache shape changes from “one full KV per head per layer” to “one latent vector per layer”:

    1. # Pseudocode: illustrates the cache shape difference only, not a real API
    2. # Traditional approach: cache shape = [layers, heads, seq_len, head_dim * 2]
    3. # Low-rank compression: cache shape = [layers, seq_len, latent_dim], latent_dim << heads * head_dim
    4. latent = kv_down_proj(hidden) # project down before writing to cache
    5. k, v = kv_up_proj(latent) # project back up when needed

    2.2 Orthogonalization Granularity Determines Training Stability

    Low-rank compression is not free: the full projection matrix is prone to numerical scale imbalance during optimization, and stability degrades in later training stages. The improvement mentioned in the source material changes the practice of orthogonalizing the entire projection matrix as one block to orthogonalizing each attention head separately (understandable as a “Muon Split” style idea). The goal of orthogonalization is to make the weight distribution more uniform and the condition number healthier. Once the granularity is refined to the single-head level, each head can independently maintain good numerical properties, avoiding a few heads dragging down overall convergence.

    A transferable engineering lesson: any optimizer strategy based on a “global uniform constraint” is worth trying at a finer granularity in multi-layer, multi-head ultra-large models. This often improves the convergence curve without adding parameters.

    3. Architectural Change Two: Multi-Token Prediction

    Multi-Token Prediction (MTP) makes the model predict not only the next token at each position but several future tokens at once. It brings three benefits:

    • Denser training signal: each position provides stronger supervision for the same corpus, improving sample efficiency;
    • It forces the model to learn longer-range dependencies, which is especially effective for strongly constrained sequences like code and structured text;
    • At inference time it connects naturally to speculative decoding: the extra prediction heads can act as a draft model, verified by the main model, reducing the number of decoding steps.

    A schematic training objective:

    1. # Pseudocode: training objective for multi-token prediction
    2. loss = 0
    3. for offset in range(1, K + 1): # K is the prediction span
    4. logits = head[offset](hidden) # the prediction head for offset
    5. loss += cross_entropy(logits, tokens[:, offset:])

    A practical note: a larger prediction span is not always better. Too large a span introduces noisy labels, so the optimal value usually needs to be scanned on a validation set and evaluated jointly with the draft acceptance rate on the inference side.

    4. Architectural Change Three: Sparse Attention

    The third change is sparse attention (DSA). It solves a different problem from low-rank compression: MLA compresses the “representation size of each token,” while sparse attention reduces the “number of connections between tokens.” Stacked together, long-text inference benefits in both memory and compute.

    Common implementations combine local windows, a small number of global anchors, block-based selection, and similar patterns. The key design point is that the sparse pattern must match the task distribution. Code and documentation corpora are highly structured, so the gains from sparsification are high; for open-domain dialogue, a poorly chosen sparse strategy can easily drop critical information.

    5. From Report to Production: A Reusable Implementation Path

    1. Evaluation first. Look at the general capability index, the text arena, and the code arena together; a single leaderboard is not enough to support a selection decision.
    2. Cost modeling. Estimate compute with “activated parameters × token volume,” and estimate memory with the “KV cache shape.” Avoid inferring cost directly from total parameters.
    3. Deployment shape. Ultra-large-scale MoE typically needs multi-machine, multi-GPU tensor parallelism combined with expert parallelism. You can rely on a container platform for orchestration, object storage to hold weights, and logging plus monitoring and alerting to track throughput and latency.
    4. Inference optimization. Enable low-rank caching and sparse attention first, then layer on the speculative decoding gains from multi-token prediction.
    5. Data strategy. Follow a “pre-training first, mid-training for shaping” ratio, injecting high-quality domain data at the mid-training stage.

    6. Conclusion

    The core narrative of this generation of ultra-large-scale MoE is not parameter stacking but the engineering of “decoupling capacity from compute”: low-rank attention compresses memory, per-head orthogonalization stabilizes training, multi-token prediction improves sample efficiency, and sparse attention cuts long-text overhead. For developers, understanding these four points provides the basic framework for evaluating and deploying similar models. On Baidu AI Cloud, you can combine general capabilities such as container platforms, object storage, and monitoring and alerting to bring these optimizations into a production environment that is observable and operable.