Scaling to Trillion-Parameter MoE: Architecture Evolution and Technical Analysis of Ultra-Long-Context Models
This article dissects a recently published technical report on a 2.8-trillion-parameter mixture-of-experts (MoE) multimodal model that activates only about 104 billion parameters per forward pass, natively supports vision inputs and a 1-million-token context, and achieves top scores on open benchmarks. We break down its architectural choices, training strategy, and engineering optimizations—focusing on three highly reusable ideas: a numerically safe parameterization for linear attention (KDA), a quantile-based load-balancing mechanism that replaces auxiliary loss in extreme-scale MoE training, and a chunked attention residual design that mitigates deep-network degradation. The article also outlines the four-stage curriculum (8K → 64K → 256K → 1M tokens) and agentic reinforcement learning used to build long-context agent capabilities. These techniques offer practical, direct value for teams building large-model infrastructure.
Scaling to Trillion-Parameter MoE: Architecture Evolution and Technical Analysis of Ultra-Long-Context Models
Background: Three Bottlenecks in Scaling Large Models
As large models move from “being able to chat” to “being able to work,” the industry demands three higher-level capabilities: processing ultra-long contexts with millions of tokens, stably training trillion-parameter MoE networks under extreme sparsity, and supporting long-horizon reasoning and tool calling in agent tasks. These three requirements correspond to the hardest open problems in current large-model research and development.
A recently published technical report demonstrates a representative technical route: a multimodal MoE model with approximately 2.8 trillion total parameters, activating only about 104 billion parameters per forward pass. It natively supports vision input and a 1-million-token context, and achieves state-of-the-art results on open benchmarks. This article uses the technical solutions disclosed in that report as a thread, breaking down the architecture design, training strategy, and engineering implementation layer by layer, and distilling the most reusable technical ideas.
Overall Architecture: Deep Integration of Sparsity and Multimodality
The MoE Backbone
The core idea of Mixture of Experts (MoE) is “use parameter count for knowledge capacity, use activation sparsity to control compute cost.” The model carries a large expert network with 896 routed experts, coupled with a gating mechanism that activates only a few experts per token during forward propagation. This design allows the total model capacity to reach the trillion scale, while the per-inference compute cost remains at the level of a hundred-billion activated parameters—far better cost-performance than a dense model of equivalent compute.
Three Improvements in the Attention Module
The attention part is the most worth reading section of the report, as it combines three techniques:
Gated Multi-head Latent Attention (Gated MLA): Uses latent compression to reduce the memory footprint of the KV cache, then introduces a gating mechanism to enhance expressiveness. It is a compromise between “saving memory” and “preserving quality” for long-context scenarios.
Incremental Attention with Lower-Bound Decay Parameterization (KDA): A key improvement in the linear-attention direction, detailed below.
Attention Residual (AttnRes): Allows attention outputs in deep layers to share information across layers, mitigating the representation-degradation problem in deep Transformers while reducing memory and communication overhead.
Activation Function and Load Balancing
The expert networks use a SiTU-GLU-style activation function to improve nonlinear expressiveness. For load balancing, the model abandons the traditional auxiliary loss and instead uses a quantile-based balancing mechanism, avoiding interference from auxiliary loss with the main task gradient.
Deep Dive into Key Technologies
KDA Lower-Bound Decay: Numerical Safety for Linear Attention
When linear-attention / DeltaNet-style operators are computed in parallel over chunks, they need to compute the inverse of the cumulative decay factor. Under limited precision like BF16, this inverse easily overflows or underflows, forcing the diagonal part inside a chunk to fall back to position-wise computation, which cannot utilize the matrix-multiplication acceleration of Tensor Cores.
KDA’s approach is remarkably simple: it changes the log-decay parameterization from unbounded negative Softplus to a lower-bounded Scaled Sigmoid, fixing a lower bound (e.g., -5). This keeps the scaling factor within any 16-token chunk locked in a safe numerical range. The engineering benefit is direct: all causal chunks (both diagonal and non-diagonal) can uniformly go through the dense GEMM path, eliminating special-case compute branches and greatly improving throughput. It also naturally supports million-token context extrapolation under the No-Positional-Encoding (NoPE) setting.
# Pseudo-code: lower-bound decay parameterizationdef log_decay(z):g_min = -5.0return g_min * torch.sigmoid(z) # output is bounded within [-5, 0]
For engineering teams, this is a typical example of “minimal change, huge gain,” worth directly adopting in custom linear-attention operators.
Quantile-Based Balancing: MoE Load Balancing Without Auxiliary Loss
Traditional auxiliary loss guides routing by penalizing load imbalance, but it conflicts with the language-modeling objective’s gradient. The quantile-based balancing mechanism uses runtime statistics instead: it dynamically adjusts the affinity of each expert according to the quantiles of the load distribution, achieving “fast dynamic balancing.” At the extreme sparsity scale of 896 experts, this method preserves training stability without sacrificing main-task performance.
Chunked Attention Residual: Breaking the Depth Bottleneck
As layers deepen, the attenuation of information passed layer-by-layer becomes a representation bottleneck. The chunked attention residual allows shallow-layer attention information to be injected across layers with low overhead, structurally alleviating the “effective depth” problem in deep networks. Because intermediate results are reused, memory and communication overhead actually decrease.
Training Strategy: Multi-Stage Context Extension + Agentic Post-Training
Pre-training uses a four-stage curriculum: 8K → 64K → 256K → 1M tokens, letting the model gradually adapt to long-range dependencies. Post-training adds agentic reinforcement learning (Agentic RL) at the million-token level, enabling the model to learn planning, tool invocation, and error correction in real multi-step tasks. This route of “first extend the context, then train the agent” has become the mainstream paradigm for long-context agent models.
Conclusion
The value of this technical report lies not in any single metric, but in demonstrating a coherent engineering route: using numerically safe parameterization to solve operator efficiency, using auxiliary-loss-free balancing to stabilize extreme-scale MoE training, using structured residuals to solve depth bottlenecks, and finally using curriculum training to unlock million-token context and agent capabilities. For teams building large-model infrastructure, these three techniques offer high direct reuse value.
