Large Model Architecture Convergence: Sparse MoE, Sparse Attention, and Training Stability Explained
This article breaks down the emerging architectural blueprint behind recent large language models: separating capacity from activation with sparse mixture-of-experts, moving attention from full to layered sparse patterns with cross-layer index reuse, and improving training stability through hyper-connections and multi-step prediction. It also outlines a four-dimension evaluation framework covering quality, efficiency, cost, and stability, plus practical deployment advice for teams running these models on cloud infrastructure.
1. Introduction: Why Architecture Design Is Back in Focus
Recent gains in large model capability increasingly come from the joint effect of data quality, training strategy, and architecture design rather than from scaling a single dimension. Once parameter counts reach the hundreds of billions or even trillions, dense architectures show diminishing marginal returns on both training and inference: memory and communication overhead on the training side grow roughly linearly, while memory access and compute consumption on the inference side are hard to compress.
As a result, the industry has converged on a repeatedly validated path: trade conditional computation for capacity, trade sparsification for efficiency, and then use engineering techniques to make the irregular computation introduced by sparsity manageable again.
Several recently released large models share a common trait based on public information: they do not introduce a brand-new paradigm, but recombine components already proven effective across a range of open-source and closed-source work, then scale them up thoroughly in large-scale pretraining and post-training. This article takes a neutral view to abstract the technical skeleton of this combination and discusses the motivation, cost, and implementation considerations of each layer of design.
2. Overall Skeleton: Separating Capacity from Activation
A typical configuration of these models can be summarized as follows: the backbone has more than seventy layers; except for a few individual layers, most layers use a sparse mixture-of-experts structure; each layer contains hundreds of routed experts and one shared expert, and each token activates only a fixed number of the top experts.
The key design idea here is decoupling capacity from computation. Total parameter count determines the model’s knowledge ceiling, while the number of experts activated per token determines the actual computation. Hundreds of experts mean a very large parameter pool, but Top-K routing (commonly 6 to 8) keeps the floating-point operations per token within a controllable range. The shared expert carries general knowledge and common transformations, avoiding all experts repeatedly learning the same basic mapping, and making routing more likely to converge to “specialization” rather than “averaging.”
It is important to note that this structure is not without cost. Increasing the number of experts brings three practical problems: imbalanced routing load, communication amplification under expert parallelism, and reduced operator efficiency caused by irregular token-to-expert mapping within a batch. In engineering practice, these are usually mitigated with load-balancing auxiliary loss, capacity factor limits, grouped routing, and overlapping communication with computation.
3. Attention Layers: From Full to Layered Sparse
The second key change is in attention. Full attention has a quadratic cost for long contexts, so mainstream approaches shift to sparse patterns: a lightweight scoring module first selects a small number of highly relevant historical positions for each query token, and exact attention is computed only on those positions.
A notable engineering detail is cross-layer reuse of the index. If every layer independently computes a Top-N selection, both the selection overhead and memory access overhead are considerable; caching the sparse index and sharing it across layers lets multiple layers use the same candidate set, significantly reducing repeated computation in the selection stage. The implicit assumption of this design is that the key positions attended to by different layers overlap heavily semantically. This usually holds in practice, but it may lose precision on tasks requiring fine-grained local retrieval, so real systems often retain a small local window or a few full layers as compensation.
Schematically, the selection logic can be abstracted as the following pseudocode:
# Pseudocode: cross-layer shared sparse index selectionindex_cache = Nonefor layer in range(num_layers):if index_cache is None or layer % reuse_interval == 0:scores = lightweight_scorer(hidden_states) # lightweight scoringindex_cache = topk(scores, k=selected_tokens) # select candidate positionsattn_out = sparse_attention(q, k, v, index_cache) # compute only candidate positionshidden_states = layer_norm(attn_out + hidden_states)
Here reuse_interval controls the reuse frequency and is the most direct tuning knob between precision and efficiency.
4. Connectivity and Training Stability: Hyper-Connections and Multi-Step Prediction
The primary problem brought by stacking at very large scale is optimization stability. Residual connections are the baseline, while hyper-connection-style schemes extend inter-layer information flow from “single-path addition” to learnable weighted multi-path passing, mitigating gradient decay and representation collapse in deep networks and making hundred-layer stacking trainable.
Another common component is the multi-step prediction head, a lightweight module natively attached above the backbone to predict the token N steps ahead. Its value has two sides: during training it serves as auxiliary supervision, giving representations long-range planning ability earlier; during inference it can directly serve speculative decoding, where the small module first proposes several candidates and the backbone model verifies them in parallel, reducing the number of backbone forward passes. It is worth noting that the actual speedup of speculative decoding depends on the candidate acceptance rate; if the acceptance rate is low, the extra verification adds overhead instead, so it must be evaluated against the specific task distribution.
5. How to Evaluate These Models Objectively
An advanced architecture does not equal business readiness. An evaluation framework is recommended across four dimensions:
- Quality: evaluate general knowledge, code, math, and long-text understanding separately, avoiding a single aggregate score that hides weaknesses.
- Efficiency: distinguish the prefill and decode stages, measure time to first token and per-token latency separately, and report throughput and performance under concurrency.
- Cost: measure cost per effective token rather than unit price alone; the cost of sparse models depends heavily on batching strategy and expert parallelism configuration.
- Stability: observe performance decay under long contexts and whether routing load distribution stays balanced over time.
6. Implementation Recommendations
When deploying these models on the cloud, container platforms can be used to host inference services for elastic scaling, object storage can manage model weights and datasets, logging services and monitoring and alerting systems can track latency percentiles, memory usage, and routing balance metrics, and message queues can smooth out traffic peaks and troughs. Baidu AI Cloud offers a relatively complete combination of these general capabilities, making it easier for teams to focus on model selection and business evaluation.
A three-step practical path is recommended: first, use a small-scale benchmark to verify whether quality and latency meet business thresholds; then tune cost per unit through quantization, batching, and parallelism strategies; finally, establish canary release and rollback mechanisms, bringing model versions, prompt templates, and decoding parameters under unified management.
7. Conclusion
The core methodology of these new models is not mysterious: systematically combine proven sparse experts, sparse attention, cross-layer index reuse, hyper-connections, and multi-step prediction, then release their potential through large-scale pretraining and post-training. For developers, the real challenge is not understanding the structure, but building a reproducible evaluation and cost model to judge whether a given architectural gain falls within their own business distribution.
