Ultra-Scale MoE Multimodal Models: Architecture Design and Training Practices

    This article walks through the engineering path for building ultra-large-scale Mixture-of-Experts (MoE) multimodal models, using a public technical report as a reference. It is organized around four dimensions—overall architecture, training stability, long-context extension, and post-training—and details three notable innovations: lower-bounded decay parameterization for linear attention, quantile-based (QB) expert load balancing that avoids auxiliary loss, and block-level attention residuals (Block AttnRes). It closes with reusable lessons for engineers building large-model training pipelines, along with a note on running such workloads on cloud infrastructure.

    As model scale has moved from the hundreds-of-billions range toward the trillion-parameter range, the industry has accumulated substantial engineering experience in designing ultra-large-scale MoE architectures. Using a public technical report as a reference, this article systematically reviews the practical path and technical trade-offs of ultra-large multimodal models across four dimensions: architecture design, training stability, long-context extension, and post-training. It is intended as a reference for engineers working on large-model R&D.

    Overall Architecture: Sparsification with Native Multimodal Support

    The model described in the report follows a typical ultra-large-scale MoE design: total parameters reach the trillion level, while each inference pass activates only about 4% of them. This “large capacity, low activation” philosophy is a mainstream approach for increasing a model’s knowledge capacity under a constrained compute budget. Its core architectural traits come down to three points:

    1. Native multimodality: Visual capability is not bolted on through an external adapter but is jointly modeled with text during pre-training, giving the model a unified representation space for mixed image-text input.
    2. Ultra-long context: It supports a context window on the order of a million tokens, far beyond the conventional 128K level. This is critical for long-document understanding, repository-level code analysis, and long-horizon agent tasks.
    3. Hybrid attention: The attention layers combine two paradigms—linear attention (KDA-style) and gated latent attention (Gated MLA-style). The former reduces the computational complexity of long sequences, while the latter controls memory usage by compressing the key-value cache through low-rank projection.

    For enterprise applications, the takeaway is that scaling model capability should not rely on “piling on parameters” alone. Instead, it should come from the coordinated design of sparse activation, attention compression, and multimodal fusion, striking a balance between inference cost and the capability ceiling.

    Innovation 1: Lower-Bounded Decay Parameterization for Linear Attention

    The problem

    Linear attention operators (such as Delta Net and gated linear attention) face a subtle but critical numerical issue during block-parallel computation: the intra-block computation requires the reciprocal of a cumulative decay factor, and when that decay factor becomes extremely small under finite precision (BF16), its reciprocal overflows or underflows severely. The conventional engineering workaround routes the diagonal tile through a special position-wise computation path that bypasses matrix-multiply acceleration—but this means the diagonal tile cannot use Tensor Cores, turning it into a performance bottleneck in the entire compute pipeline.

    The approach

    The report’s solution reparameterizes the generating function of the decay parameter: the original unbounded negative-softplus form is replaced with a scaled Sigmoid form that has a fixed lower bound, so the logarithm of the decay value is constrained to a safe interval (for example, a lower bound fixed at -5). As a result, within any 16-token block, the reciprocal scaling factor stays locked within the range that BF16 can represent exactly.

    Benefits

    • Eliminates the special branch: All causal blocks (diagonal and off-diagonal) can directly call dense matrix-multiply acceleration, greatly simplifying the kernel implementation.
    • Higher throughput: With a unified compute path, GPU utilization and overall training throughput improve markedly.
    • Extrapolation-friendly: This parameterization is naturally compatible with a NoPE (no positional encoding) design, making the model’s extrapolation from short context to million-level context smoother.

    It is worth emphasizing that this change is minor in mathematical form but has a large impact on the efficiency of the underlying operator implementation—a typical case of “parameterization choices determining the engineering ceiling,” and a directly useful reference for teams building their own linear attention operators.

    Innovation 2: Quantile-Based (QB) Expert Load Balancing

    The load-balancing challenge in large-scale MoE

    When the number of routed experts reaches the hundreds or even thousands, load balancing becomes a central challenge for training stability. The traditional approach introduces an auxiliary loss to penalize imbalance across experts, but this has side effects: the auxiliary loss competes with the main task loss at the gradient level, and its hyperparameters are hard to tune—a problem that grows worse as the number of experts increases.

    The core idea of QB

    The quantile-based balancing strategy sidesteps the auxiliary loss and instead performs dynamic adjustment directly at the routing-decision level: by continuously tracking the historical load distribution of each expert, it dynamically maps tokens in the current batch to relatively idle experts according to quantiles, achieving soft balancing with “no extra loss term.” Its advantages include:

    1. Zero gradient interference: The main loss function stays clean and does not affect the model’s language-modeling objective.
    2. Fast response: Load adjustment takes effect immediately during the forward pass of inference/training, without waiting for gradient feedback.
    3. Strong scalability: When the number of experts scales from a few dozen to nearly a thousand, the mechanism itself needs no redesign.

    Combined with a stable latent MoE architecture and an improved GLU-style activation function, this combination keeps training stable even under extreme sparsity. For teams building their own MoE training pipelines, “dynamic balancing without auxiliary loss” is a direction worth validating first.

    Innovation 3: Block-Level Attention Residuals (Block AttnRes)

    Deep Transformers face a common problem: as layers deepen, the attention outputs of successive layers tend to become homogeneous, creating a bottleneck in representational capacity, while per-layer activation caching also brings considerable memory and communication overhead.

    The idea behind Block AttnRes is to introduce cross-layer residual connections of attention outputs between layers, allowing shallow-layer attention information to be injected directly into deeper layers at very low cost. Its effects show up in two areas:

    • Representation level: It breaks the “representation collapse” of deep networks, enabling different layers to form complementary, division-of-labor information processing.
    • System level: Because cross-layer sharing reduces redundant computation and the storage need for intermediate caches, both memory usage and communication volume in training and inference decrease.

    This aligns with the recent industry trend of “inter-layer information reuse”: rather than having every layer extract information from scratch, it is better to design low-cost cross-layer channels.

    Training Path: Multi-Stage Context Extension and Agentic Reinforcement Learning

    Progressive long-context pre-training

    The model was not trained directly on million-token sequences. Instead, it uses a multi-stage extension strategy of 8K → 64K → 256K → 1M. Each stage gradually lengthens the sequence on top of the previous stage’s convergence, which brings several benefits:

    1. The vast majority of training steps are completed on short sequences, making compute usage efficient.
    2. Each extension multiplier is controllable (about 4x), keeping the risk of positional-generalization failure low.
    3. It makes it easy to produce usable intermediate versions along the way, supporting iterative evaluation.

    This is the general best practice for long-context training in the industry: first solidify language and knowledge capability on short sequences, then extend the window in stages.

    Agent-oriented post-training

    After pre-training, the model went through agentic reinforcement-learning post-training at the million-token level. The key to this stage is constructing long-horizon task environments (such as multi-turn tool calls, cross-file code modification, and long-chain information retrieval), letting the model learn through real interaction:

    • How to plan and decompose tasks spanning thousands of steps.
    • How to accurately locate key information within an ultra-long context.
    • How to self-correct after an execution error.

    Long-context capability and agent capability are complementary: the former provides the capacity to “remember,” while the latter trains the strategy to “use it well.” Only by combining the two can real, complex tasks be supported.

    Takeaways for Developers

    Drawing together the lessons from this report, the reusable engineering experience for ultra-large models can be distilled into four points:

    1. Operator-level parameterization determines hardware efficiency: The lower-bounded decay parameterization for linear attention shows that a seemingly purely mathematical choice can directly determine whether Tensor Cores can be fully utilized.
    2. Stability mechanisms should be as non-intrusive as possible: Auxiliary-loss-free load balancing resolves the core tension of sparse training without disturbing the main objective.
    3. Architectural innovation should serve both capability and cost: The attention residual improves representation quality while reducing memory overhead—an example of a “win-win design.”
    4. The training path should be progressive and controllable: The combination of multi-stage context extension and agentic reinforcement learning has gradually become the standard paradigm for long-context models.

    For enterprises looking to put ultra-large-model capabilities into practice, the same ideas can be implemented on mature cloud infrastructure—for example, using the GPU compute, high-performance parallel file storage, and container platform offered by Baidu AI Cloud to build a training pipeline and turn architecture-level experience into reproducible engineering output.

    The competition among ultra-large models is, in essence, a combined contest of “architectural innovation × systems engineering × data quality.” Understanding the trade-off logic behind these designs matters more than memorizing specific numbers.