Trillion-Parameter MoE Multimodal Large Models: Architecture Design and Training Practices

    This article analyzes the architecture design and training practices of a representative trillion-parameter sparse multimodal large model. It covers a hybrid attention mechanism combining linear attention with Gated MLA, lower-bounded decay parameterization for numerical stability, block-level attention residuals, latent-space routing with quantile balancing for load balancing without auxiliary loss, and a multi-stage long-context training strategy from 8K to 1M tokens, followed by agentic reinforcement learning. Practical recommendations for infrastructure and evaluation are also provided.

    Trillion-Parameter MoE Multimodal Large Models: Architecture Design and Training Practices

    As large models scale toward trillions of parameters, achieving ultra-long context, multimodal understanding, and agent-level long-horizon reasoning simultaneously while keeping compute costs under control has become a focal point for the industry. Based on a representative sparse multimodal large model technical solution, this article systematically analyzes its architecture choices, key operator designs, and training engineering methods, providing reusable technical references for large-scale model R&D.

    1. Overall Architecture Overview

    The model adopts a Mixture-of-Experts (MoE) architecture with approximately 2.8 trillion total parameters, activating only about 104 billion parameters per forward pass, yielding a sparse activation ratio of roughly 3.7%. This “large capacity, small activation” design paradigm essentially trades parameter space for knowledge capacity and uses conditional computation to control inference cost. The model natively supports visual multimodal input and extends the context window to the million-token level.

    From a system perspective, this architecture must simultaneously address three core questions:

    1. Computational efficiency for ultra-long contexts: how attention complexity can grow approximately linearly with sequence length;
    2. Training stability for massive experts: how hundreds or thousands of routed experts can avoid load collapse and gradient anomalies;
    3. Long-horizon agent reasoning capability: how reinforcement learning can enable the model to maintain goal consistency across extremely long trajectories.

    The following sections elaborate on each.

    2. Hybrid Attention Mechanism: Synergy of Linear Attention and Full Attention

    Pure full attention becomes unacceptable in terms of computation and KV cache overhead at million-token scales, while pure linear attention suffers from degraded exact retrieval capability. This solution adopts a hybrid strategy: most layers use incremental linear attention, and a small number of layers retain Gated Multi-head Latent Attention (Gated MLA) as the full-attention backbone.

    2.1 Lower-Bounded Decay Parameterization

    Traditional linear attention (such as Delta Net-like structures) requires computing the reciprocal of accumulated decay factors within each block during block-parallel computation. When decay parameters are generated by an unbounded negative Softplus function, the decay factors may approach zero, and their reciprocals are highly prone to overflow or underflow under low-precision formats like BF16. This forces diagonal tiles to take an explicit “position-pair” computation path, unable to leverage Tensor Core dense matrix multiplication for acceleration.

    The improvement is to change the decay parameterization to a lower-bounded scaled Sigmoid form: fixing the decay lower bound (e.g., -5) constrains the log decay within a safe range. As a result, the reciprocal scaling factor within any 16-token block is locked within a finite numerical range, allowing both diagonal and non-diagonal blocks to uniformly use dense GEMM paths.

    The engineering benefits are threefold:

    • It eliminates the special branching logic for diagonal blocks, greatly simplifying operator implementation and facilitating unified optimization at the CUDA/CUTLASS level;
    • All causal blocks can invoke Tensor Core matrix multiplication, significantly improving throughput;
    • Because it does not rely on explicit positional encoding (NoPE), the model has a natural ability to extrapolate directly to million-level contexts.

    The takeaway from this change is that numerical stability constraints should be front-loaded into the parameterization design stage, rather than patched in the operator implementation.

    2.2 Cross-Layer Attention Residuals

    Deep Transformers generally suffer from a “deep representation bottleneck”: as layers increase, the effective information in hidden states grows more slowly. This solution introduces block-level attention residuals (Block AttnRes), allowing attention outputs from shallow layers to be passed across layers to deeper layers in a residual form, enabling cross-layer information sharing. Compared with simply adding more layers, this approach mitigates deep representation degradation without significantly increasing memory and communication overhead, while also reducing the amount of activations transmitted across nodes, making it particularly friendly to large-scale pipeline parallelism.

    3. Training Stability Design for Ultra-Large-Scale MoE

    3.1 Latent-Space Routing and Expert Organization

    On the MoE side, a sparse structure with about 896 routed experts is used, and routing is performed in a latent space, combined with an improved GLU variant activation function to enhance the nonlinear expressiveness of experts. The benefit of latent routing is that it reduces the dimensionality and noise of routing decisions, making token-to-expert assignment smoother and more controllable.

    3.2 Auxiliary-Loss-Free Quantile Load Balancing

    Traditional MoE relies on auxiliary load-balancing loss to prevent expert collapse, but auxiliary loss conflicts with the main task loss in terms of gradients, making hyperparameter tuning extremely difficult at the scale of hundreds of experts. This solution adopts a quantile balancing mechanism: instead of modifying the optimization objective, it dynamically adjusts routing biases so that the quantiles of the probability distribution for each expert being selected are aligned, thereby transforming load balancing from an “optimization problem” into a “control problem.”

    The advantages of this method are:

    • The main task gradients are not disturbed, leading to higher convergence quality;
    • It is insensitive to the number of experts and can scale to nearly a thousand experts;
    • Implementation only requires maintaining lightweight running statistics, with low engineering intrusion.

    4. Multi-Stage Ultra-Long Context Training Strategy

    The pretraining context length follows a staged progression strategy: 8K → 64K → 256K → 1M. Each stage is allocated only a small training budget, but the model is required to fully adapt to the current window before moving to the next stage. This curriculum-style extension significantly reduces the computational waste of training directly on ultra-long sequences.

    The post-training stage introduces agentic reinforcement learning (Agentic RL) at the million-token level: the model performs multi-step tool calls and planning tasks over extremely long trajectories, with reward signals targeting the final outcome rather than individual actions. This requires infrastructure that supports efficient sampling and credit assignment for ultra-long trajectories, which is key to developing long-horizon agent capabilities.

    The implication for engineering teams is that ultra-long context capability is not trained in one shot, but is the result of combining architectural extrapolation, staged curriculum, and long-horizon RL.

    5. Practical Implementation Recommendations

    Based on the above analysis, enterprises can refer to the following points when building or selecting large-scale model infrastructure:

    1. Prioritize numerical path review for operators: when evaluating new operators such as linear attention, first check their block-wise numerical ranges under low precision to avoid rework later;
    2. Focus on sparse activation ratio on the inference side: total parameters determine deployment storage cost, while activated parameters determine inference compute cost; plan for them separately;
    3. Elastic compute and storage support: ultra-long context training places stringent demands on memory and networking. General cloud capabilities such as container platforms, object storage, and monitoring/alerting can be used to build elastic training environments. For example, Baidu AI Cloud’s compute and storage product suite can support resource scheduling and stability assurance for such large-scale training tasks;
    4. Diversify benchmark validation: in addition to conventional leaderboards, add evaluation dimensions closer to business needs, such as long-context retrieval and multi-turn agent tasks.

    6. Conclusion

    The core lessons from trillion-parameter sparse multimodal models can be summarized in three points: use bounded parameterization to solve the numerical and parallelism bottlenecks of linear attention, use control-based mechanisms instead of auxiliary loss to achieve stable training of massive experts, and use staged curriculum plus long-horizon reinforcement learning to build ultra-long context capability. These methodologies do not depend on specific products and have direct reuse value for any large-scale model R&D team.