Key Techniques in Ultra-Scale MoE Multimodal Models
This article breaks down the core engineering techniques behind ultra-scale sparse multimodal MoE models, using a representative native multimodal model with roughly 2.8 trillion total parameters, about 104 billion activated parameters, and a 1M-token context as an abstract reference. It covers the unified sparse-plus-multimodal architecture, lower-bounded decay parameterization for linear attention, gated latent attention with block attention residuals, quantile balancing for routing stability at extreme expert counts, and multi-stage context extension with agentic post-training. It closes with a reusable checklist for developers working on large-scale training and inference optimization.
1. Introduction: Why Trillion-Scale Sparse Multimodal Models Are Hard
Since 2026, the technical competition in open-source large models has shifted from stacking parameter counts toward the systems engineering of sparse efficiency and long-range capability. A typical flagship form is a native multimodal MoE model with about 2.8 trillion total parameters, about 104 billion activated parameters, native visual input support, and a 1M-token context. The difficulty lies not in the parameter count itself but in three coupled engineering problems: attention computation and memory efficiency under ultra-long contexts, routing stability at a scale of thousands of experts, and post-training convergence for long-horizon agentic tasks.
This article uses the technical report of such a model as an abstract reference, strips away product-specific attributes, and extracts reusable technical paradigms for developers working on large-scale training and inference optimization.
2. Overall Architecture: Unifying Sparsity and Multimodality
The model backbone uses a Mixture-of-Experts (MoE) structure with 896 routed experts, a typical “extreme sparsity” configuration: each token activates only a tiny fraction of the parameters, so inference cost is decoupled from total parameter count. The vision side uses native multimodal fusion rather than a bolted-on visual encoder, so visual tokens and text tokens share the same positional and attention mechanisms.
The attention module combines three parts:
- Kimi Delta Attention (KDA): the linear-complexity backbone for long sequences;
- Gated Multi-head Latent Attention (Gated MLA): compresses the KV cache into low-rank latent vectors to reduce memory usage;
- Attention Residual (AttnRes): shares information across layers to relieve the deep representation bottleneck.
The MoE side adds stabilization designs: a SiTU-GLU-style activation function improves gradient scale, and a quantile balancing (QB) mechanism replaces the traditional auxiliary loss for load balancing.
3. Core Technique 1: Lower-Bounded Decay Parameterization for Linear Attention
Pain Point
Linear attention / Delta Net-style methods need the reciprocal of the cumulative decay factor during chunked computation. If the decay is parameterized as an unbounded negative softplus, numerical overflow or underflow easily occurs under BF16 precision. In practice, this forces the diagonal tile onto an explicit position-pair path, which cannot call Tensor Core dense matrix multiplication, so compute utilization drops sharply.
Mechanism
Change the log-decay from unbounded to a lower-bounded scaled Sigmoid form:
# Illustrative: lower-bounded decay parameterizationg_min = -5.0g = g_min * torch.sigmoid(a * h + b) # g in (g_min, 0)decay = torch.exp(g) # cumulative decay stays controlled
Because g is locked to the (g_min, 0) interval, the reciprocal scaling factor within any 16-token tile falls in a safe numerical range.
Benefits
- Removes the special branch for diagonal tiles; all causal tiles go through dense GEMM uniformly, greatly simplifying the operator implementation;
- Throughput gains come mainly from Tensor Core utilization, not from changes in algorithmic complexity;
- Naturally compatible with a NoPE (no positional encoding) design, which helps extrapolation to million-level contexts.
Engineering takeaway: at the operator level, “numerical boundary design” often determines real throughput more than complexity optimization at the algorithm level, and is worth reviewing first when building custom operators.
4. Core Technique 2: Gated Latent Attention and Attention Residuals
The value of gated multi-head latent attention is that it compresses the KV cache into a low-rank latent space, and the gate controls the strength of information writes, keeping memory and communication overhead manageable under million-token contexts. It complements linear attention: fine local retrieval is handled by latent attention, while global long-range compression is handled by linear attention.
The Block Attention Residual injects shallow-layer representations into deeper layers at block granularity, effectively giving the deep network an “information shortcut.” It has three benefits: relieving deep representation degradation, lowering the peak of activation memory, and reducing cross-device communication. In practice, aggregate residuals at the block level to avoid the bandwidth amplification caused by per-token residuals.
5. Core Technique 3: Stability of Extreme-Sparse MoE
At a scale of 896 experts, the most fatal problem is not quality but routing collapse: a few experts are over-selected while the rest suffer gradient starvation. The traditional approach adds an auxiliary load-balancing loss, but it conflicts with the main task objective and requires repeated weight tuning.
The idea of quantile balancing (QB) is to avoid the auxiliary loss: it dynamically reallocates expert capacity directly by the quantiles of routing scores, aligning each expert’s load with the quantile target in a statistical sense. Its advantages are faster convergence at ultra-large scale and fewer hyperparameters.
Recommended practices:
- Choose a GLU variant with temperature smoothing to control activation variance;
- Normalize before routing scores to avoid score-scale drift;
- Monitoring metrics should include expert load entropy, dropped-token ratio, and router jitter.
Monitoring suggestions:expert_load_entropy # closer to log(N_experts) means more balanceddropped_token_ratio # ratio dropped due to insufficient capacityrouter_jitter # routing change magnitude between adjacent steps
6. Training Pipeline: Multi-Stage Context Extension and Agentic Post-Training
Context length is advanced progressively: 8K → 64K → 256K → 1M. Each stage unfreezes only the position/length-related parameters while keeping the rest frozen, which significantly reduces total cost and avoids wasting compute in the early short-sequence stages.
After pre-training, the model enters million-token-level agentic reinforcement learning post-training, targeting planning, tool calling, and error recovery in long-horizon tasks. Practical points include: task environments must be reproducible, rewards must be layered (outcome reward plus process reward), and rollout length must match the context stage.
7. Reusable Checklist and Deployment Suggestions
Top 3 techniques most worth reusing:
- Lower-bounded decay parameterization for linear attention—small engineering change, large operator gains;
- Quantile balancing—auxiliary-loss-free load balancing at large scale;
- Block-level attention residuals—breaks the depth bottleneck while saving memory and communication.
To deploy on your own platform, you can rely on a container platform for elastic training orchestration, use object storage to hold massive corpora and checkpoints, and use logging services and a monitoring/alerting system to track expert load and numerical anomalies. Baidu AI Cloud can provide standardized resource and operations support for these general capabilities, helping teams focus on the algorithms and operators themselves.
8. Conclusion
The competitiveness of trillion-scale sparse multimodal models ultimately comes down to the product of three factors: numerical stability, operator efficiency, and routing balance. These paradigms do not depend on any specific product and can all serve as design references for building your own large-scale training system.
