Scaling MoE LLMs: Architecture Innovations and Training Optimization for Ultra-Large-Scale Models

    This article examines the key engineering challenges and technical breakthroughs in building ultra-large-scale Mixture-of-Experts (MoE) models with trillions of parameters. It focuses on four core innovations: a bounded-decay parameterization that stabilizes linear attention for efficient parallel computing; a Quantile Balancing (QB) mechanism for auxiliary-loss-free dynamic load balancing among thousands of experts; a block attention residual method for cross-layer information sharing; and a multi-stage training strategy coupled with Agentic Reinforcement Learning (RL). The discussion provides a reusable technical framework for developers addressing numerical stability, routing efficiency, and deep representation bottlenecks in extreme-scale model training.

    As large language models (LLMs) push parameter counts into the trillions, the Mixture-of-Experts (MoE) architecture has emerged as the predominant approach for balancing computational cost with model capability. In the latest generation of multimodal models with total parameters exceeding 2.8 trillion and over 100 billion active parameters per inference step, native vision-language support and a 1-million-token context window have become baseline requirements. However, this extreme scale introduces severe challenges to underlying architecture design. This article explores core innovations in attention mechanism optimization, expert load balancing, and cross-layer information sharing for ultra-large MoE models, offering reproducible technical patterns for real-world engineering.

    1. Numerical Stability and Parallel Computing Optimization for Linear Attention

    In long-context scenarios, traditional attention mechanisms suffer from quadratic computational complexity. Linear attention and its variants, such as Delta Net, offer a promising direction for alleviating this bottleneck. However, deploying linear attention on Tensor Cores introduces significant numerical precision challenges.

    Key Challenge: When computing within internal chunks, standard linear attention accumulates decay factors. In limited-precision environments such as BF16, the reciprocal of the decay factor is highly prone to numerical overflow or underflow. This forces the diagonal blocks to fall back to an explicit position-dependent computation path, preventing the use of Tensor Core GEMM (General Matrix Multiply) acceleration and significantly degrading hardware utilization.

    Solution: Bounded-Decay Parameterization. The industry has proposed an innovative parameterization scheme to address this issue. Instead of the unbounded negative softplus form used for log-decay, this method employs a bounded, scaled Sigmoid function. By setting a fixed lower bound (e.g., a constant like -5), the reciprocal scaling factor within any 16-token tile is confined to a safe numerical range. This modification introduces minimal engineering cost while yielding substantial benefits. It entirely eliminates the special computation branch for diagonal blocks, enabling all causal blocks—both diagonal and non-diagonal—to be processed by dense Tensor Core GEMM operations. This significantly improves implementation efficiency on CUDA/CUTLASS and naturally supports direct context extrapolation to millions of tokens without positional encoding.

    2. Auxiliary-Loss-Free and Fast Dynamic Load Balancing with Quantile Balancing

    With an MoE architecture housing nearly a thousand routed experts, maintaining training stability under extremely sparse activation conditions is a critical challenge.

    Key Challenge: Conventional MoE load balancing relies on auxiliary loss functions. However, in scenarios with a massive number of experts, these auxiliary losses introduce additional computational overhead and frequently conflict with the main task gradients, leading to slow convergence or even degraded performance. Moreover, static balancing strategies fail to adapt to the dynamic shifts in expert popularity that occur across different training phases.

    Solution: Quantile Balancing (QB) Mechanism. To overcome this, a novel mechanism called Quantile Balancing has been introduced. This strategy discards the auxiliary loss path entirely. Instead, it dynamically adjusts the routing policy by computing real-time quantile information of expert load distribution. The QB mechanism can effectively capture the “hot” and “cold” distribution of experts, achieving millisecond-level load redistribution without interfering with the primary network gradient updates. This approach not only prevents the “winner-take-all” phenomenon that leads to expert collapse but also considerably boosts training throughput and stability for large-scale expert MoE architectures.

    3. Cross-Layer Information Sharing and Breaking the Deep Representation Bottleneck

    As Transformer layers deepen, models tend to encounter a representation bottleneck where information is progressively lost during cross-layer propagation, while memory and communication overhead keep rising.

    Solution: Block Attention Residual. To break through this bottleneck, the model architecture incorporates a block attention residual mechanism. This allows attention modules in different layers to share information directly. By constructing residual connection paths, deeper features can efficiently access high-frequency information from shallower layers. This cross-layer sharing helps mitigate the vanishing gradient problem and enhances long-range reasoning ability. Additionally, feature reuse reduces memory usage (HBM) and decreases communication overhead between nodes.

    4. Multi-Stage Pre-training and Agentic RL Post-training

    The pre-training of ultra-large multimodal models typically follows a staged expansion strategy. A common practical pathway is a multi-stage context extension protocol: 8K → 64K → 256K → 1M tokens. This gradual approach effectively controls computational costs during the early training phases and progressively builds the model’s ability to manage extremely long sequences.

    Following pre-training, a post-training phase that applies Agentic Reinforcement Learning (RL) at the million-token level becomes crucial for mastering long-range reasoning. By constructing complex, multi-step reasoning task environments and using RL algorithms to optimize the model’s decision-making and planning within ultra-long contexts, the model is trained not only to process long inputs but also to reason deeply.

    5. Infrastructure Support for Training Large-Scale Models

    Building and training trillion-parameter MoE models requires robust underlying computational and cloud infrastructure. In practice, this entails managing terabyte-scale high-frequency data throughput, synchronizing thousands of accelerator cards, and scheduling massive numbers of expert parameters concurrently.

    Leveraging high-performance computing clusters and distributed parallel storage services—such as those offered by Baidu AI Cloud—provides developers with a stable, high-bandwidth computational foundation. Cloud container platforms combined with efficient network topologies (e.g., RDMA) enable the creation of a non-blocking parameter synchronization environment, which significantly alleviates latency bottlenecks in the All-to-All communication required by MoE architectures. Furthermore, integrating cloud-based logging and monitoring systems allows research and development teams to observe loss anomalies and hardware failures across tens of thousands of training steps in real time, enabling rapid fault recovery and ensuring the stable execution of long-duration training tasks.

    6. Conclusion

    The evolution of ultra-large MoE models is not just an increase in parameter count; it represents a synthesis of optimizations at the operator level, innovations in routing mechanisms, and restructuring of network architectures. From bounded-decay parameterization solving linear attention parallelism bottlenecks, to the Quantile Balancing mechanism achieving auxiliary-loss-free load balancing, and Block AttnRes breaking deep representation barriers, these technical innovations offer a highly valuable and reusable engineering paradigm. For developers and enterprises, deeply understanding these core mechanisms and relying on dependable cloud infrastructure will be key to building a competitive edge in the era of large models.