A Complete Technical Guide to Large-Scale MoE Models
This article breaks down large-scale Mixture of Experts (MoE) models, covering why sparse architectures are gaining renewed attention, how total parameters, activated parameters, expert count, and depth interact, and how staged training data is split between pre-training and mid-training. It also explains how to interpret public benchmark results, the key deployment constraints around memory, parallelism, routing balance, and KV cache, and which scenarios are best suited to very large MoE models. The goal is to help developers decide when a 700B-class sparse model is worth deploying and how to evaluate it reliably with their own data.
1. Why the Industry Is Revisiting Sparse Architectures
Over the past two years, gains in large model capability have closely tracked the simultaneous growth of parameters and data, but inference cost has risen linearly as a result. This has turned “a stronger model” and “a cheaper API call” into a contradiction. The value of the Mixture of Experts (MoE) architecture lies precisely here: it decouples model capacity from the compute required for a single inference pass. Total parameters determine how much knowledge a model can “remember” and “express,” while activated parameters determine the scale that actually participates in each forward pass. Once the two are separated, parameter count can keep expanding while the compute cost per token stays within an acceptable range.
One common misconception needs clearing up: sparse does not mean free. Raising activated parameters from 32B to 40B genuinely increases the compute demand of a single inference pass; at the same time, expert weights must still reside fully in memory, so memory usage scales with total parameters. What MoE optimizes is therefore the compute-to-capacity exchange ratio, not the elimination of cost.
2. Fundamentals: The Triangle of Capacity, Activation, and Depth
Take a representative configuration from the current generation of open-source models: 744B total parameters, 40B activated per inference pass, 256 experts, and 80 layers. Each of these numbers carries a clear engineering meaning.
- 744B total parameters: determines knowledge capacity and coverage of long-tail tasks, and sets the memory floor for deployment.
- 40B activated parameters: determines the floating-point operations per token, and is the main factor affecting latency and throughput.
- 256 experts: finer-grained experts enlarge the routing combination space and allow more thorough specialization, but make routing load balancing harder.
- 80 layers: a deeper network favors layer-by-layer abstraction for complex reasoning, but amplifies pipeline-parallel splitting and bubble problems.
Compared with the previous generation’s 355B total and 32B activated configuration, this generation doubles capacity while raising activation by roughly 25%, following a “capacity first, restrained compute” evolution path. This path suits scenarios where the capability ceiling is the primary goal while online inference cost is kept within a controllable range.
3. The Data Side: Dividing Labor Between Pre-Training and Mid-Training
The training corpus expanded from 23T tokens to 28.5T tokens, with roughly 27T used for pre-training and 1.5T for mid-training. This split reflects a mature training methodology:
- The pre-training stage pursues breadth and scale, aiming to build a complete language and world-knowledge foundation; data mixtures usually require repeated tuning across general corpora, code, math, and multilingual data.
- The mid-training stage pursues “capability shaping,” using high-quality, high-difficulty synthetic and filtered data to strengthen target tasks such as reasoning, code, and tool use; the data volume is small but the per-unit value is high.
- The post-training stage (supervised fine-tuning and preference optimization) handles aligning output style, refusal boundaries, and format constraints.
The takeaway for practitioners is that data scale is not the only variable, and the payoff from staged data mixtures often exceeds simply piling on more volume. If 1.5T tokens of mid-training data meaningfully improve code and reasoning performance, its marginal return is far higher than the same volume of general corpora.
4. Capability Validation: How to Read Public Evaluation Results
Claims such as “a certain open-source model scores 50 on a composite intelligence index and ranks first among open-source models,” or “it leads open-source models on both the text arena and the code arena, on par overall with top overseas closed-source models,” need to be interpreted carefully. The following framework is recommended:
- Look at dimensions, not the total score: a composite index is a weighted result across multiple benchmarks, and the choice of weights significantly affects rankings. When selecting a model, break out the sub-items strongly relevant to your business, such as code generation, long-context understanding, and structured-output stability.
- Watch for arena preference bias: human-blind-vote arenas reflect “human preference,” are sensitive to expression style and formatting friendliness, and are not fully equivalent to business metrics.
- Mind the gap between evaluation and production: benchmark tasks are mostly static, single-turn, and denoised; production traffic includes multi-turn context, dirty data, very long system prompts, and strict format requirements.
- Build a small regression set: sampling 200–500 typical requests from real logs to form a repeatable evaluation set is the ultimate basis for a decision.
5. Engineering Deployment: Key Constraints for Running Models at This Scale
Getting a 700B-class MoE model into production is usually not about “whether it can run,” but about “whether it runs stably and affordably.”
Memory and parallelism strategy. Expert weights alone create enormous memory pressure. In practice, tensor parallelism is commonly combined with expert parallelism, alongside pipeline parallelism to control per-device load. An illustrative parallel plan looks like this:
# Illustrates only how the parallelism dimensions combine; not a specific framework APIparallel_plan = {"tensor_parallel_size": 8, # splits operators within a layer"expert_parallel_size": 16, # distributes experts across devices"pipeline_parallel_size": 4, # splits by layer to reduce per-device memory}# Total device count must match the product of the three, with room reserved for KV Cache
Routing and load balancing. The most typical problem under expert parallelism is that hot experts overload individual devices while others sit idle. Engineering practice usually introduces a capacity factor to cap the tokens a single expert can receive, combined with an auxiliary balancing loss to smooth the distribution during training; on the inference side, the actual load dispersion across devices needs to be monitored.
Second-round memory budgeting. Beyond weights, the KV Cache is often the real bottleneck in long-context scenarios. If the business centers on long-document question answering, prioritize evaluating general techniques such as cache quantization, paging management, and prefix reuse rather than blindly enlarging batch size.
Elasticity and cost structure. The compute demand of sparse models is relatively stable, making them suitable for container platforms with auto-scaling and multi-replica canary rollouts; logging services and monitoring alerts should cover four metric categories—time to first token, per-token latency, queue time, and device load—to pinpoint performance inflection points.
6. Selection Guidance: Which Scenarios Suit Very Large MoE
- Suitable: complex code generation and refactoring, multi-step reasoning and planning, structured extraction from long documents, and core business with a high capability ceiling and controllable call volume.
- Use caution: high-concurrency, low-difficulty classification and rewriting tasks, where a small dense model has a lower unit cost.
- Compromise: tiered routing that sends hard requests to the large model and simple requests to a small model is the most common way to control total cost; model distillation can also distill large-model capability into small models that can be called at high frequency.
7. Conclusion
The combination of 744B total parameters, 40B activated, 256 experts, and 80 layers represents a clear path of trading capacity for capability and sparsity for cost; the staged data mixture of 28.5T tokens shows that data engineering is moving from “piling on volume” toward “layered shaping.” For developers, the real judgment to build is this: public leaderboards are for ruling out clearly unsuitable options, a business regression set is for making the final decision, and parallelism strategy, routing balance, and cache management determine whether this capability can be delivered to users stably and economically. If an organization wants to validate how such models perform in practice on Baidu AI Cloud, it can build a reproducible evaluation and load-testing environment using general capabilities such as container platforms, object storage, and monitoring alerts, and draw its own conclusions from its own data.
