Ultra-Large-Scale MoE Multimodal Models: Architecture and Engineering Essentials
This article explores the architecture and engineering challenges of ultra-large-scale Mixture-of-Experts (MoE) multimodal models, focusing on trillion-parameter configurations with million-token contexts. It covers activation ratios, memory bottlenecks, KV Cache calculations, and key techniques such as bounded decay parameterization in linear attention to prevent underflow during training.
1. Problem Boundaries and Data Scope
This article discusses models with a total parameter count reaching the trillion level, utilizing a Mixture-of-Experts (MoE) structure, supporting multimodal inputs like images, and featuring context lengths of up to 1 million tokens. The scale figures cited (approximately 2.8 trillion total parameters, 104 billion active parameters per pass, and 896 routed experts) are derived from a publicly available example configuration. These numbers have not been verified against original papers or model cards and should be treated as illustrative examples rather than official metrics.
The activation ratio can be directly calculated: 104 billion divided by 2.8 trillion is approximately 3.7%. Each token only passes through about 3.7% of the parameters, meaning the forward compute for a single token is comparable to a dense model with around 104 billion parameters (ignoring the attention portion). However, the weights of all experts must still reside in VRAM. Therefore, the primary bottlenecks during deployment are weight VRAM, KV Cache VRAM, and cross-node communication, rather than pure compute power.
2. Architecture Overview
| Module | Example Configuration | Design Purpose | Main Risk |
|---|---|---|---|
| MoE Layer | 896 routed experts, sparse activation (referred to as Stable LatentMoE in the source) | Expand model capacity with slower compute growth | Expert load imbalance, increased cross-node communication |
| Activation Function | SiTU-GLU (source name) | Enhance expert expressiveness | Exact structure needs verification against the source |
| Attention | Low-rank KV compression similar to MLA | Reduce KV Cache size | Excessive compression ratio affects accuracy |
| Residual Path | Block attention residual | Reuse shallow features across layers | Training stability requires ablation verification |
| Context Length | 1 million tokens | Understand long documents and code repositories | VRAM and latency increase with length |
A correction is necessary here: the source text states that VRAM consumption for long contexts grows quadratically. This is only true for explicitly materialized attention score matrices in standard implementations. The VRAM for the KV Cache grows linearly with length. This distinction directly impacts capacity planning.
The KV Cache is calculated as follows:
Bytes per token for KV Cache = 2 × number of layers × number of KV heads × head dimension × bytes per element
Assuming the model has 60 layers, 8 KV heads, a head dimension of 128, and uses BF16 (2 bytes per element), each token occupies approximately 245,760 bytes, or about 0.25MB. One million tokens would require about 246GB (in decimal units), and this does not even account for model weights. Even with low-rank compression, the cache size for ultra-long contexts remains massive. The benefits of compression schemes must be re-evaluated using actual configurations.
3. Three Key Technologies
1. KDA: Bounded Decay Parameterization
In linear attention, a decay factor Γ needs to be accumulated within each chunk, and its reciprocal calculated. If the per-step log decay has no lower bound, the cumulative product may underflow in low precision. In such cases, the diagonal blocks can only fall back to an element-wise computation path, preventing the direct use of matrix multiplication on tensor cores, which negatively impacts training speed.
The source approach bounds the log decay g of each token to the interval [g_min, 0):
g = g_min · σ(x)
where g_min is a negative lower bound (the source example uses -5), σ is the Sigmoid function, and x is the raw parameter obtained from the input projection. Consequently, the single-step decay factor exp(g) falls within (exp(g_min), 1).
Regarding the naming, the source translates KDA as “Incremental Attention.” According to public sources, KDA likely stands for Kimi Delta Attention; please verify against the original paper before citing.
The numerical range can be checked with a simple calculation. Within a 16-token tile, the maximum cumulative log decay is 16 × (-5) = -80, and the maximum value of its reciprocal is exp(80), approximately 5.5×10³⁴. This is below the maximum value representable by BF16 (approximately 3.4×10³⁸).
