Technical Breakdown of Sparse Mixture-of-Experts LLMs: Architecture, Cost, and Deployment
This article breaks down the architecture of highly sparse Mixture-of-Experts (MoE) large models from a general engineering perspective, without focusing on any specific product. It explains the core design trade-offs: a shallow 45-layer backbone, 288 routed experts with only 8 activated per token (around 320B total parameters and 18B active parameters), interleaved linear and sparse attention for long context, manifold-constrained hyper-connections, and native multimodal pretraining. It also covers capability and cost implications, a minimal evaluation framework, practical deployment considerations, and the main risks and limitations of this model class.
1. Introduction: Why Lightweight Activation Matters
As competition in large models shifts from parameter count to compute efficiency per unit of output, the industry is increasingly focused on one question: can we maintain or even improve capability while drastically reducing the compute and memory cost per token? A recently released class of native multimodal sparse models offers a useful case study: roughly 320 billion total parameters, with only about 18 billion activated per token, significant gains on multiple coding and agent benchmarks over the previous generation, and an order-of-magnitude reduction in inference cost. Setting aside product-specific details, this article dissects the design philosophy from a general architecture standpoint and outlines practical deployment and evaluation methods.
It is worth emphasizing that the “small activation, large total parameter” approach is not simply about stacking parameters. It redistributes the cost structure: capacity lives in sparse experts, while efficiency lives in the attention and residual paths. Understanding this is a prerequisite for evaluating the cost-performance ratio of any similar model.
2. Overall Architecture: Extremely Sparse MoE with a Shallow Backbone
The key parameters of this architecture can be abstracted into the following configuration (illustrative, not a specific product interface):
Total layers: 45First few layers: Dense (dense feed-forward)Total experts: 288 (routed experts)Routing per token: 8 expertsTotal parameters: ~320BActive parameters: ~18BContext length: Native 1MModalities: Text + image + video input
There are three notable design trade-offs here.
First, the shallow backbone. Forty-five layers is on the shallow side for a modern large model. The advantage of a shallow structure is lower communication and scheduling overhead and more controllable inference latency; the cost is that expressive power must be compensated by wider feed-forward layers and stronger residual mixing.
Second, extremely sparse routing. With 288 experts and only 8 selected per token, the routing sparsity is very high. Higher sparsity yields two direct benefits: lower compute per token, and the ability for experts to become highly specialized (for example, leaning toward code, math, multilingual, or structured output). The cost is that load balancing and routing stability become harder to control.
Third, the first few layers remain dense. Since shallow features are not yet abstract, premature sparsification would degrade the quality of general representations. Using dense feed-forward layers at the bottom is therefore a common and reasonable practice.
3. Attention Design: Periodic Interleaving of Linear and Sparse Attention
The main cost of long context comes from attention: standard attention grows quadratically with sequence length, while the key-value cache expands linearly with length. This architecture adopts an interleaved scheme of “linear attention in most layers plus sparse attention in a few layers”:
- About two-thirds of the layers use linear attention, responsible for low-cost modeling of continuous context;
- A sparse attention layer is inserted every few layers, responsible for precise long-range retrieval;
- Only about 11 of the 45 layers are sparse attention, a ratio close to three to one.
The sparse attention layers further introduce an index pool mechanism that compresses index keys at roughly a four-to-one ratio, reducing cache usage while preserving retrieval capability. According to public descriptions, relative to the previous generation of the same family, attention compute is reduced to about one-third and the key-value cache to about 4.25x smaller.
The essence of this “interleaving” idea is division of labor: linear layers perform “broad and shallow” context aggregation, while sparse layers perform “narrow and deep” localization of key information. Engineering-wise, it brings a clear benefit: long context is no longer uniformly expensive across all layers, but rather cheap in most layers and expensive in a few, significantly flattening the overall cost curve.
4. Residuals and Hyper-Connections: Compensating for Depth with More Complex Mixing
The biggest risk of a shallow structure is information degradation as it passes between layers. To address this, the architecture introduces a manifold-constrained hyper-connection scheme, using a more complex cross-layer information mixing method than standard residuals to alleviate the expressive bottleneck of shallow networks. It can be understood as: under a limited layer budget, the “depth-for-width” trade is compensated by a more refined residual topology.
There are two practical implications: first, when training such models, the numerical stability and initialization strategy of the residual paths are more sensitive than in conventional structures; second, when performing distillation, quantization, or structural pruning, layers cannot be pruned simply one by one, as this can easily break the integrity of cross-layer mixing.
5. Native Multimodality and Ultra-Long Context
Unlike the approach of “text first, then attaching a vision encoder,” native multimodal means jointly modeling text, image, and video from the pretraining stage, with official figures citing on the order of 30 trillion tokens of multimodal pretraining data. The value of native joint training is more natural cross-modal alignment: visual information does not have to pass through a lossy projection layer, making it friendlier to tasks such as chart understanding, UI screenshot understanding, and video temporal understanding.
Native million-level context extends use cases from “long-document question answering” to “whole-repository code understanding,” “long-video event summarization,” and “multi-turn agent trajectory retrospection.” It is worth noting that usable long context does not mean free long context: actual throughput is still affected by the attention implementation, caching strategy, and batching approach.
6. Capability and Cost Structure: What the Flash Positioning Really Means
From public benchmarks, this class of model scores around 57 on an artificial intelligence analysis intelligence index-style evaluation, at a cost of about $0.05 per task; it comprehensively outperforms the previous generation on six coding and agent benchmarks, with software engineering tasks around 63 versus 46 and workflow automation tasks around 49 versus 26, approaching the current first-tier closed-source flagship models.
The conclusion here should not be read as “cheap, therefore good enough,” but rather: in high-frequency-call scenarios such as coding and agents, an order-of-magnitude cost reduction directly changes the product form—for example, from “manually triggered” to “fully automatically triggered,” and from “sampled quality inspection” to “full verification.” What a change in cost structure brings is often not saving money, but redrawing the boundaries of capability.
7. Practical Implementation: Evaluating and Deploying This Class of Model on Baidu AI Cloud
The advice for developers is to make evaluation solid first, then talk about model selection. The following minimal evaluation skeleton can be reused:
# Illustrative: capability-cost dual-dimension evaluation skeletoncases = load_cases("coding_agent_suite") # self-built case setfor c in cases:out = model.generate(prompt=c.prompt, max_tokens=4096)score = rubric_judge(out, c.expected) # rules + model reviewcost += estimate_tokens(c.prompt, out) # input/output priced separatelyreport(score, cost, latency_p95)
On the engineering side, four points deserve attention:
- Routing observability. Extremely sparse models require monitoring of expert load distribution to avoid hotspot experts causing long-tail latency.
- Caching and batching. In long-context scenarios, key-value cache hit rate and prefix reuse strategy have a major impact on cost; request orchestration can be combined with general caching services and message queues.
- Elastic scaling. Deploy inference services on a container platform and scale out by concurrency shards; unify logs and metrics into logging services and monitoring alerts.
- Data and model assetization. Store training and evaluation data in object storage, with unified permissions and version management to ensure evaluation reproducibility.
If an enterprise already has a need to integrate self-developed or third-party models, it can use the model service category on Baidu AI Cloud to handle a unified gateway, rate limiting, and cost accounting, avoiding maintaining separate integration layers for different models.
8. Risks and Boundaries
- Stability of sparse routing: under extreme inputs, expert assignment drift may occur, requiring fallback strategies.
- Poor prunability of shallow structures: structural compression space is smaller than for conventional deep models.
- Multimodal data compliance: video and image inputs involve copyright and privacy, requiring filtering and auditing on the data side.
- Evaluation comparability: prompt and scoring methods differ significantly across evaluation sets, so cross-source scores should not be directly compared.
9. Conclusion
The core significance of this type of release lies not in any single score, but in validating a combined route: extremely sparse MoE, a shallow backbone, interleaved linear and sparse attention, manifold-constrained hyper-connections, index compression, and native multimodality. It turns “capability improvement” and “cost reduction” from an opposing relationship into an engineering problem that can be optimized simultaneously. For development teams, what truly needs to be built is an evaluation and deployment system that can measure capability, latency, and unit cost at the same time—this has more long-term value than chasing a single leaderboard ranking.
