Ultra-Large Sparse MoE Multimodal Models: Architecture and Training
This article explains the architecture and training considerations for an ultra-large sparse MoE multimodal model with 2.8T total parameters, 104B activated parameters, 896 routed experts, and a 1M-token context. It covers overall trade-offs among sparsity, multimodality, and long context; three reusable techniques—bounded-decay incremental linear attention, auxiliary-loss-free quantile-balanced routing, and block-level attention residuals; a multi-stage 8K-to-1M context pretraining curriculum and million-token agent post-training; and engineering evaluation priorities for training and inference.
Ultra-Large Sparse MoE Multimodal Models: Architecture and Training
The value of an ultra-large sparse-expert multimodal model is not only in parameter scale. It also depends on whether the model remains trainable, inferable, and operable across million-token contexts, visual inputs, and agent tasks. A representative design uses 2.8 trillion total parameters, 104 billion activated parameters, 896 routed experts, and a 1M-token context, with a sparse activation ratio of about 27:1. This ratio means that a single computation touches only a small subset of experts, but the routing system must remain stable; otherwise, communication, load imbalance, and gradient noise are amplified. The following sections discuss the overall architecture, three highly reusable techniques, the training curriculum, and engineering deployment.
1. Overall Architecture Trade-offs: Sparsity, Multimodality, and Long Context
The first major challenge of extreme sparse MoE is whether routing remains controllable as scale increases. 896 routed experts provide greater capacity, but they also introduce expert-parallel communication, load skew, and cold-start issues. A latent routing approach compresses the routing space into a lower-dimensional representation and then maps it to expert selection, reducing routing-side communication and cache pressure. At the same time, a stable latent mixture-of-experts architecture needs constraints among routing scores, expert capacity, and training stability rather than relying solely on auxiliary losses.
On the attention side, the design uses a hybrid approach: an incremental linear attention branch handles linear-complexity modeling of long sequences, while a gated multi-head latent attention branch preserves content addressing and global interaction. Pure linear attention is efficient for long contexts, but its content-addressing capability is limited for complex retrieval and multi-hop reasoning. Pure global attention is too expensive at the million-token scale. A hybrid structure allows different layers and heads to take on different roles, which is a common compromise for long-context models.
For deep representations, block-level attention residuals aggregate and share cross-layer residuals by block instead of independently storing full residuals at every layer. This preserves cross-layer information flow while reducing memory usage and communication volume in pipeline parallelism. The activation function uses a smooth gating form, combined with quantile-balanced routing, to reduce expert gradient jitter under extreme sparsity and improve training stability.
2. Incremental Linear Attention with Bounded Decay
When linear attention and incremental attention are computed in chunks, the sequence is often split into fixed-size tiles, such as 16-token tiles. Within a tile, the cumulative decay factor Γ must be computed. Traditional approaches use unbounded negative softplus-style parameterization, and the log-decay may remain negative, causing the inverse of Γ to overflow or underflow severely under limited BF16 precision. Once Γ^{-1} goes out of range, the diagonal block cannot use the matrix-multiplication acceleration path and can only fall back to explicit position-pair computation, which significantly reduces throughput.
The core of bounded decay parameterization is to constrain the log-decay within a range that has a lower bound. For example:
g_t = g_min * sigmoid(W h_t), g_min = -5log_gamma_t = sum_{i<=t} g_igamma_t = exp(log_gamma_t)# Within a 16-token tile, the inverse of gamma is constrained to a safe numerical range
Because g_t is always no greater than 0 and has a lower bound, Γ does not shrink without bound, and Γ^{-1} does not grow without bound. As a result, the diagonal block can use matrix-multiplication units within a safe numerical range, reducing the explicit position-pair path and improving implementation efficiency on GPU matrix-multiplication libraries. This change has high engineering value: the parameterization change is small, but its impact on the numerical stability and hardware utilization of the linear attention operator is significant, making it suitable for priority reuse in long-context models.
3. Auxiliary-Loss-Free Routing with Quantile Balancing
In ultra-large MoE, imbalanced expert load is a direct source of training instability. Traditional auxiliary losses encourage balance through an additional regularization term, but they can conflict with the main task objective and require careful tuning at large expert scales under extreme sparsity. A quantile-balancing strategy uses quantile statistics of routing scores to dynamically adjust routing biases or thresholds, bringing expert load close to the target distribution and avoiding contamination of main-task gradients by auxiliary losses.
An illustrative logic is as follows:
threshold = quantile(router_scores, 1 - target_ratio)for expert e:load_error[e] = target_load[e] - actual_load[e]routing_bias[e] += lr * load_error[e]
From an engineering perspective, attention must be paid to the communication overhead of distributed statistics, the sliding-window length, the bias update step during cold start, and the consistency of load observations under expert parallelism. Compared with capacity factors and token-dropping strategies, quantile balancing is better suited to ultra-large expert pools: it does not directly drop tokens but instead uses dynamic biases to direct traffic to low-load experts, reducing early expert collapse and late-stage load oscillation.
4. Block-Level Attention Residuals
The deep-representation bottleneck of deep Transformers usually appears as follows: as the number of layers increases, effective information in the residual stream is diluted, deep gradient propagation worsens, and the memory and communication overhead of per-layer residuals grow linearly. Block-level attention residuals aggregate cross-layer residuals by block, share part of the residual information within a block, and retain necessary information flow between blocks. This is not a simple removal of residuals; it changes the granularity of residual storage and aggregation.
There are three main benefits. First, it mitigates deep-representation degradation so that deep attention modules can still obtain stable cross-layer information. Second, it reduces the memory footprint of residual caches, which is especially important for million-token training. Third, it reduces activation and residual communication during pipeline parallelism. The cost is that the block size must be tuned: too large a block may lose fine-grained inter-layer information, while too small a block yields limited benefit. In practice, ablation studies should be conducted in combination with layer count, hidden dimension, and parallel partitioning.
5. Multi-Stage Pretraining and Agent Post-Training
Context extension uses a curriculum-style pretraining schedule of 8K → 64K → 256K → 1M. The short-context stage learns basic language and multimodal alignment; the medium- and long-context stages introduce long documents, codebases, mixed text-image content, and retrieval tasks; the million-token stage requires coordination with long-context data synthesis, position extrapolation strategies, and memory compression mechanisms. Training directly from scratch on 1M contexts is usually uneconomical, and staged progression makes it easier for optimizer states and attention modules to adapt smoothly.
Post-training uses million-token-level agent reinforcement learning. The focus is not single-turn question answering but tool calls, multi-turn planning, long-range memory, error recovery, and result verification. Reward design should include verifiable outcomes, process constraints, and cost penalties to prevent the model from gaming scores through verbose reasoning. Evaluation should cover long-context retrieval, multi-hop question answering, codebase understanding, visual document parsing, and agent task success rates. Public benchmark results can only serve as references; attention should be paid to data contamination, evaluation configuration, and reproducibility conditions.
6. Engineering Deployment and Evaluation Recommendations
On the training side, it is recommended to prioritize validation of three techniques: whether bounded decay parameterization increases the matrix-multiplication proportion in linear attention tiles; whether quantile balancing reduces load variance at the 896-expert scale; and whether block-level attention residuals reduce both memory and communication at the target layer count. On the inference side, linear attention state caches and latent attention KV caches need to be managed separately, with paging, eviction, and prefix reuse handled well in long-context scenarios. Cloud deployment can combine general capabilities such as container platforms, object storage, logging services, and monitoring and alerting to continuously observe expert-parallel communication, long-document throughput, and tail latency.
Overall, the key to this type of architecture is not a single parameter but the joint design of long-context efficiency, MoE training stability, and agent long-range reasoning. The most reusable parts are bounded decay parameterization, quantile balancing, and block-level attention residuals: they address numerical stability, routing stability, and deep-representation stability, respectively. Their engineering changes are manageable, making them suitable as foundational optimizations for ultra-large multimodal models.
