A Deep Dive into Large-Scale MoE Model Architecture and Training Techniques
This article breaks down the architecture and training design of a large-scale Mixture of Experts (MoE) model with roughly 744B total parameters and about 40B activated per inference. It explains the parameter-to-activation ratio, benchmark positioning, and three key architectural choices—MLA combined with optimizer orthogonalization tuning, multi-token prediction, and sparse attention—along with practical deployment considerations for long-context, large-scale inference.
A Deep Dive into Large-Scale MoE Model Architecture and Training Techniques
1. The Basics: The Gap Between Total and Activated Parameters
To judge the real cost of an MoE (Mixture of Experts) model, total parameter count alone is misleading. What matters is the ratio between total parameters and activated parameters. The model discussed here has roughly 744B total parameters but activates only about 40B per inference pass, configured with 256 experts across 80 layers. The activation ratio is about 5.4%, meaning most weights take no part in a single forward pass. Memory footprint and compute cost are effectively decoupled.
Compared with the previous generation, total parameters grew from around 355B to 744B, activated parameters rose from 32B to 40B, and the pretraining corpus expanded from 23T tokens to 28.5T tokens (about 27T in pretraining and 1.5T in mid-training). Two engineering implications stand out:
- Total parameters doubled while activated parameters grew only slightly, indicating that scaling happened mainly along the “knowledge capacity” dimension rather than the “compute per token” dimension. This is the core advantage of MoE over dense models.
- Mid-training is separated out as its own stage, typically handling long-context extension, high-quality data annealing, and targeted capability reinforcement. It is becoming an increasingly important part of modern LLM training pipelines.
2. Benchmark Positioning: How to Read the Scores
On a comprehensive capability benchmark, this class of model scores around 50, ranking first among open-source models and sitting in the same tier as the leading international closed-source models. It also ranks near the top of the open-source field in human-preference text and code arenas.
Benchmark scores are a necessary reference, not a sufficient conclusion. In practice, the safer approach is to build your own evaluation set that reflects real business traffic and to track the following alongside the aggregate score:
- Instruction following and format stability;
- Information recall and position sensitivity in long contexts;
- Executable rate and unit-test pass rate for generated code;
- Variance across repeated samples of the same prompt, i.e., output consistency.
3. Architectural Change One: Co-Tuning MLA with Optimizer Orthogonalization
The attention mechanism uses MLA (Multi-latent Attention), which follows the same idea as existing low-rank compression schemes: Key/Value tensors are compressed into a low-dimensional latent space and only the compressed representation is cached, substantially reducing KV cache memory and bandwidth pressure in long-text scenarios.
However, the team observed a counterintuitive result during training: paired with a Muon-style optimizer, MLA underperformed the structurally simpler GQA-8 configuration. The cause can be abstracted as a mismatch between the optimizer’s update geometry and the structure of the parameter blocks. Muon-style optimizers rely on orthogonalized updates of parameter matrices. When an entire projection matrix is orthogonalized as one block, the compressed latent dimensions and the multi-head structure are “averaged together,” the representations learned by individual attention heads converge toward homogeneity, and representational diversity drops.
The fix is Muon Split: orthogonalization granularity is pushed down from “the whole projection matrix” to “each attention head individually,” as sketched below:
# Pseudocode: whole-block orthogonalization vs. per-head split orthogonalizationdef muon_update(W, lr):# W: [out_dim, in_dim]return W - lr * orthogonalize(W)def muon_split_update(W, num_heads, lr):# Split the output dimension by attention head and orthogonalize each independentlyhead_dim = W.shape[0] // num_headsnew_W = []for h in range(num_heads):W_h = W[h * head_dim:(h + 1) * head_dim, :]new_W.append(W_h - lr * orthogonalize(W_h))return torch.cat(new_W, dim=0)
The general lesson here is that sparse or low-rank structures are coupled with the optimizer, so any architectural change must be re-checked against the optimization strategy. Otherwise you can easily end up with a design that saves memory in theory but performs worse in practice.
4. Architectural Change Two: Multi-Token Prediction
Multi-Token Prediction has the model predict several future tokens at each position during training instead of only the next one. The benefits are threefold:
- Denser training signal: the same corpus yields more supervision, improving sample efficiency;
- More forward-looking representations: the model must encode longer-range planning information, which is especially helpful for code completion and structured output;
- Flexible trimming at inference: keeping only the main prediction head avoids extra inference cost, and combined with speculative decoding it may translate into actual speedup.
Implementation requires care with loss weighting and the number of heads: too much weight on auxiliary heads can interfere with convergence of the main task, so it is typically decayed over the course of training.
5. Architectural Change Three: DSA Sparse Attention
DSA (sparse attention) uses a learnable routing/selection mechanism so each query attends only to a subset of key positions, reducing attention complexity from quadratic to near-linear. The engineering value is concentrated in long contexts: memory and latency growth curves flatten out, allowing servers to handle longer inputs.
Key points for adoption:
- Train/inference consistency: the sparse pattern must be present during pretraining; bolting it on afterward causes distribution shift;
- Recall fallback: for cases where critical information happens to fall in a skipped position, retain a small number of global tokens or a sliding-window channel;
- Evaluate together with KV compression: the gains from sparse attention and low-rank KV caching do not simply add up, so measure end-to-end throughput.
6. Deployment Recommendations
To reproduce or deploy this class of large-scale MoE model in your own environment, pay attention to the communication overhead from expert parallelism and routing load balancing, the actual compute budget implied by activated parameters, and the impact of KV caching and sparse strategies on memory. General cloud capabilities such as container platforms, object storage, logging services, and monitoring and alerting can support elastic scaling and observability. Baidu AI Cloud typically provides support around these same general capability categories for large-scale inference scenarios.
Overall, the significance of this generation of open-source models is not just topping the leaderboards. It validates the feasibility of a technical route—large total parameters with small activation, co-design of architecture and optimizer, and sparse long-context handling—and gives the open-source community a reusable engineering paradigm.
