Three Core Techniques for Ultra-Scale MoE Multimodal Models
This article breaks down three reusable techniques behind ultra-scale MoE multimodal models: numerically safe linear attention with lower-bounded decay parameterization, auxiliary-loss-free expert load balancing via quantile balancing, and block attention residuals for deep networks. It explains the bottlenecks each technique addresses, how each mechanism works, and practical guidance for training pipelines and deployment.
1. Why Stacking Scale Is No Longer a Silver Bullet
As total parameters climb into the trillions and context length approaches one million tokens, the bottleneck in training and inference has shifted from “do we have enough parameters” to “are the numerics stable, is computation parallelizable, and are memory and communication under control.” Consider a class of ultra-scale MoE multimodal models described in an open-source technical report: roughly 2.8 trillion total parameters, about 104 billion activated parameters, native fusion of the visual modality, and context rolled out in stages from 8K to 64K, 256K, and 1M, with hundreds of routed experts. The real difficulty of such systems concentrates in three areas:
- Efficiency and numerical safety of attention computation under ultra-long context;
- Expert load balancing and training stability under extreme sparsity;
- Representation degradation in deep networks, along with memory and communication overhead.
The following sections break down the three reusable technical paradigms that address each area.
2. Numerical Pitfalls of Linear Attention and Lower-Bounded Decay Parameterization
2.1 Root Cause
Linear attention and incremental linear attention compress history by accumulating a decay factor, reducing complexity from quadratic in sequence length to linear. However, chunked implementations require the reciprocal of the accumulated decay factor for scaling within each chunk. If the decay is parameterized in an unbounded form such as negative softplus, overflow or underflow easily occurs under the finite precision of BF16/FP16.
The engineering consequence is concrete: diagonal tiles cannot use the standard matrix multiplication path and require a separate branch of logic for each position pair. This makes it hard to fully utilize Tensor Cores and increases the maintenance cost of operators.
2.2 Mechanism
A widely validated fix changes the log decay from an unbounded form to a scaled Sigmoid with a lower bound, as illustrated below:
# Illustrative code: expresses the parameterization idea onlyg_min = -5.0log_decay = g_min * torch.sigmoid(raw_param) # lower bound fixed at g_min# within any 16-token tile, the reciprocal scaling factor is constrained to a safe numerical range
The key is the fixed lower bound, which locks the reciprocal scaling within any small chunk to a safe range and eliminates the special branch.
2.3 Benefits
- Diagonal and non-diagonal causal blocks all go through dense matrix multiplication, significantly simplifying operator implementation;
- Throughput gains come from higher Tensor Core utilization rather than precision compromises;
- Naturally compatible with no positional encoding schemes, providing a numerical foundation for direct extrapolation to million-level context.
3. Auxiliary-Loss-Free Expert Load Balancing at Ultra Scale
3.1 The Cost of Conventional Approaches
When the number of experts rises to hundreds or nearly a thousand, routing skew is amplified: a few popular experts become overloaded while many remain idle. The conventional approach adds an auxiliary loss to constrain the load distribution, but this creates gradient conflicts with the primary task objective, and the coefficient is sensitive and costly to tune.
3.2 Quantile Balancing
A more engineering-friendly approach aligns routing scores directly to quantiles (Quantile Balancing): tokens are mapped to target quotas according to preset quantile thresholds, replacing the extra loss term with dynamic thresholds. Its advantages are:
- No auxiliary loss, so the primary objective’s gradient is not polluted;
- Thresholds update dynamically during training, adapting to changes in expert scale;
- Low computational overhead, suitable for extremely fast large-scale parallel training.
Practical tip: align the quantile update frequency with the parallel topology to avoid too many synchronization points slowing overall throughput.
4. Block Attention Residuals: Breaking the Deep Representation Bottleneck
Deep stacking leads to representation homogenization, while full cross-layer caching drives up memory and communication costs. Block Attention Residuals share information across layers at block granularity: only block-level summaries are retained instead of per-token caches, breaking the depth bottleneck while keeping memory and communication overhead within an acceptable range.
Engineering benefits include improved effective depth in deep layers, shorter cross-layer information paths, and more controllable peak memory. For deployment, it is recommended to jointly tune with pipeline parallelism partitioning strategies to avoid extra copies caused by misalignment between block boundaries and partition boundaries.
5. Training Pipeline and Deployment Recommendations
Multi-stage context progression (converge on short context, extend to medium and long context, then post-train on ultra-long context and agentic reinforcement learning) is the current mainstream paradigm. For deployment, start in three places: prioritize replacing the decay parameterization for low-risk, high-reward gains; introduce auxiliary-loss-free balancing when expert scale exceeds several hundred; and enable block-level residuals when layers are deep and memory is tight. Meanwhile, combining with general cloud capabilities such as container platforms, distributed storage, logging services, and monitoring and alerting can significantly reduce the operational complexity of large-scale training.
