Long-Context Architecture Innovation in Ultra-Large-Scale MoE Models

    This article examines a new class of ultra-sparse MoE multimodal models that combine trillions of total parameters, hundreds of billions of activated parameters, and hundreds of routed experts with million-token context. It breaks down three core architectural innovations—lower-bounded decay parameterization for linear attention, auxiliary-loss-free quantile balancing for MoE routing, and block attention residuals—alongside a multi-stage pre-training and Agentic RL post-training strategy. Readers will learn which design patterns are worth reusing and how to prioritize them around numerical stability, operator efficiency, routing observability, and evaluation.

    Long-Context Architecture Innovation in Ultra-Large-Scale MoE Models

    Recently, the industry has seen a class of ultra-sparse MoE multimodal models with trillions of total parameters, hundreds of billions of activated parameters, and hundreds of routed experts. The core metrics disclosed in their technical reports include: 2.8 trillion total parameters, 104 billion activated parameters, native support for visual multimodality and million-token context, an attention module that fuses incremental linear attention with gated multi-head latent attention, and cross-layer information sharing through block-level attention residuals. On the MoE side, a stable latent mixture-of-experts architecture is combined with a gating activation function and a quantile balancing mechanism to keep training stable under extreme sparsity. Training follows a multi-stage pre-training schedule of 8K→64K→256K→1M, followed by million-token-level Agentic RL post-training.

    If we treat these numbers as nothing more than a continuation of the “parameter race,” we overlook the real technical value. Once million-level context and ultra-sparse MoE are stacked together, the system faces three sets of tensions simultaneously: long-sequence attention efficiency, training stability for massive expert routing, and consistency in long-horizon agentic reasoning. This article tries to break down the key designs of such models from an architectural and engineering perspective, and to discuss which techniques are worth reusing.

    1. Overall Architecture: Why Combine Linear Attention, Latent Attention, and MoE

    A traditional dense Transformer faces quadratic attention cost in long-context scenarios, while pure linear attention, though low in complexity, falls short in numerical precision, position extrapolation, and expressiveness. The choice here is a “hybrid”: incremental linear attention carries the main long-sequence computation, gated multi-head latent attention supplements high-quality semantic interaction, and block-level attention residuals mitigate information decay in deep networks. On the MoE side, hundreds of routed experts expand capacity while keeping per-token activated parameters in the hundreds of billions, avoiding inference cost that grows linearly with total parameters.

    The essence of this combination is “decoupling capacity from computation”: total parameters determine the model’s memory and knowledge capacity, activated parameters determine per-token compute, and context length determines the boundary of tasks that can be handled. The three must be co-designed; otherwise you get problems like “large parameters but long text won’t compute,” “long context but degraded deep representations,” or “many experts but routing collapse.”

    2. Innovation One: Lower-Bounded Decay Parameterization to Fully Utilize Matrix Compute Units in Linear Attention

    Linear attention and its variants, when computed in blocks, can overflow or underflow the reciprocal of the accumulated decay factor within a block under low-precision numeric formats. Once the reciprocal scaling factor goes out of range, the diagonal block must take an explicit position-pair path and can no longer call dense matrix multiplication like an ordinary causal block, which complicates the operator implementation and reduces throughput.

    The key change in this approach is replacing the unbounded negative-softplus form of the log decay with a lower-bounded scaled sigmoid form, fixing the lower bound at -5. Sketch:

    1. g_min = -5.0
    2. log_decay = g_min * sigmoid(linear(h_t))
    3. decay = exp(log_decay)
    4. inv_scale = 1.0 / decay # numeric range stays controlled

    Because the decay factor is confined to a safe interval, the reciprocal scaling factor within any 16-token tile stays in range. The engineering payoff is direct: diagonal blocks no longer need a special compute branch, and all causal tiles can uniformly call dense matrix multiplication; it also naturally supports direct million-token extrapolation without positional encodings. For the underlying operator libraries, this is a “small change, large payoff” reuse point, especially well suited to fused implementations in GPU programming interfaces and operator libraries.

    3. Innovation Two: Quantile Balancing, Auxiliary-Loss-Free Dynamic Load Balancing for MoE

    The biggest fear for ultra-large-scale MoE is routing collapse: a few experts overload while most sit idle, wasting capacity and destabilizing training. A common fix is an auxiliary loss, but it conflicts with the main task gradient and is hard to tune under extreme sparsity. The quantile balancing idea is: instead of relying on an auxiliary loss, compute the expert load distribution per batch and use quantiles to dynamically adjust the gating bias or capacity threshold, quickly steering the routing distribution back into the target range.

    The mechanism can be summarized as:

    • Tally the token load of each expert;
    • Compute load quantiles to identify overloaded and idle experts;
    • Apply a dynamic bias to the gating logits, suppressing overloaded experts and lifting idle ones;
    • Keep routing stable under extreme sparsity and reduce late-training jitter.

    The value of this method lies in being “auxiliary-loss-free” and in “fast dynamic adjustment.” For an MoE with hundreds of routed experts, load balancing is no longer just a hyperparameter in the training script but part of the routing system itself. When reusing this idea, pay attention to the communication cost of quantile statistics and the batch granularity, so that balancing does not introduce a new synchronization bottleneck.

    4. Innovation Three: Block Attention Residuals, Breaking the Deep-Transformer Representation Bottleneck

    In a deep Transformer, residual connections are usually accumulated layer by layer; as depth grows, this tends to cause representation homogenization, overly long gradient paths, and rising memory and communication cost. Block attention residuals divide the network into several blocks and share information across layers at the block level: each block not only receives the previous block’s output but also aggregates historical block representations through attention-style weights.

    Sketch:

    1. for block in blocks:
    2. block_input = embed + sum(alpha_i * block_output_i)
    3. block_output = block(block_input)

    This yields three benefits: first, it shortens the deep information path and eases the deep-representation bottleneck; second, it reduces the redundant memory usage of layer-by-layer residuals; third, it lowers cross-device communication frequency, which helps pipeline parallelism. For a million-context model, memory and communication are often harder constraints than FLOPs, and block-level residuals are an “architecture-level resource-saving” design.

    5. Training Strategy: Multi-Stage Context Progression and Agentic RL Post-Training

    Million-token context cannot be achieved in one step. The 8K→64K→256K→1M multi-stage pre-training is essentially curriculum learning: first stabilize core capabilities on short sequences, then progressively lengthen the context, combined with position extrapolation and attention numerical-safety strategies to reduce the risk of early long-sequence training instability. The post-training stage introduces million-token-level Agentic RL, extending the optimization objective from “next-token prediction” to “decision-making and tool-call consistency in long-horizon tasks.”

    The most noteworthy aspect of this stage is the evaluation loop: long-context capability cannot be judged only by “needle-in-a-haystack” retrieval; it must also cover multi-hop reasoning, cross-document consistency, long-horizon agent planning, and error recovery. Training and evaluation must be designed together, or the model may end up “able to read a million tokens but unable to make stable decisions over a million tokens.”

    6. Engineering Recommendations: Which Techniques to Reuse First

    In terms of reuse value, lower-bounded decay parameterization is worth landing first, because it requires few operator changes and delivers direct throughput gains; quantile balancing fits as routing infrastructure in an MoE training platform; block attention residuals suit pilots in deep-model and pipeline-parallel scenarios. On the deployment side, general-purpose capabilities such as container platforms, object storage, logging, and monitoring/alerting offered by providers like Baidu AI Cloud can host the training and inference pipelines, but the technology choices should still center on numerical stability, communication topology, and the evaluation loop.

    Specific recommendations:

    1. Start with a numerical-safety audit: check the scaling-factor range within linear-attention blocks and confirm the overflow boundaries under low-precision formats.
    2. Then fuse operators: combine the decay computation, reciprocal scaling, and matrix multiplication to reduce intermediate-tensor materialization.
    3. Build routing observability: track per-expert load quantiles, token drop rate, and routing entropy, and bring load balancing into the observability system.
    4. Validate residuals by block: starting from a small-scale deep model, compare block-level and layer-by-layer residuals on memory, communication, and convergence.
    5. Move evaluation earlier: long-context and Agentic evaluation sets should be introduced mid pre-training, so capability gaps are not discovered only in post-training.

    7. Summary

    The technical highlight of this class of ultra-large-scale MoE models is not a single parameter record, but the system-level coordination built around “million-token context + extreme sparsity”: lower-bounded decay parameterization solves the numerical and operator-efficiency issues of linear attention, quantile balancing solves routing stability across massive experts, block attention residuals solve deep-representation and communication cost, and multi-stage pre-training plus Agentic RL push long-context capability toward long-horizon tasks. For developers, what is truly reusable is these “design patterns under constraints,” not any specific model. Understanding them is what lets you make more robust architectural trade-offs in your own training and inference systems.