The Evolution of Next-Generation Sparse LLM Architectures: Sparse Attention, Shared Experts, and 1M Context
This article breaks down how a new generation of sparse large language models scales capacity and sparsity together, covering the jump to roughly 770B total parameters with about 49B activated per token, a 1M-token context window, gated sparse attention with index caching, and an expanded expert mix of 256 routed experts plus one shared expert. It explains the engineering trade-offs behind these changes, how to estimate memory and compute costs, why public benchmarks are unreliable for capability evaluation, and how to measure cost per successful task rather than price per million tokens. Developers evaluating long-context or agent workloads will find practical guidance on building private evaluation sets, cost scorecards, and staged rollout strategies.
1. Introduction: A generational shift that scales capacity and sparsity together
A preview release of a next-generation large language model has recently appeared, and its most visible change is that backbone parameters and activated parameters grow at the same time: total backbone parameters rise from about 295B to about 770B (roughly 2.6x), activated parameters per token rise from about 21B to about 49B (about 2.33x), and the context window expands from 256K to 1M (4x). At the same time, the attention mechanism switches from conventional grouped-query attention (GQA) to low-rank compressed sparse attention (commonly referred to as a DSA-style approach in the industry), paired with gating and an index cache. The number of residual streams increases, routed experts expand from 192 to 256, and one shared expert is added on top of Top-8 activation.
The significance of these changes is not “more parameters.” It is that capacity, activation, context length, and attention overhead were designed together. For developers, the real questions are which changes deliver capability gains, which only add cost, and how to use a verifiable method to decide whether a preview model belongs in a production pipeline.
2. Parameters and activation: the sparsification logic behind a 2.6x scale-up
Backbone parameters set the upper bound of the model’s knowledge capacity, while activated parameters determine the compute cost of a single token. Scaling both by roughly 2.3x to 2.6x shows that this generation did not take the old “dense scale-up” path. Instead, most of the added capacity went into sparsely routed expert layers.
The direct consequence: memory footprint grows close to linearly with parameter count, while the growth in floating-point operations per token stays relatively moderate. Three categories of resources need to be budgeted in advance:
- Weight loading and resident GPU memory (strongly correlated with total parameters);
- KV cache, which scales with context length; a 1M context amplifies this pressure significantly;
- Memory fragmentation and communication overhead from expert routing (especially visible under multi-GPU tensor and expert parallelism).
A rough illustration of the calculation approach (it shows the method only and does not represent any specific product’s numbers):
# Illustrative resource estimation onlyweight_bytes = total_params * bytes_per_param # resident weightskv_bytes = 2 * layers * kv_heads * head_dim * ctx_len * bytes_per_elem * batchact_flops ≈ 2 * activated_params * tokens # approximate compute per token
3. Attention redesign: from GQA to gated sparse attention with an index cache
The most notable change in this generation is the complete redesign of the attention layer. The previous generation used conventional GQA; this generation uses gated sparse attention across all 78 layers, and only 21 of those layers run a full Indexer, while the remaining 57 layers reuse token indices already selected by earlier layers. Full-indexer layers sit at roughly evenly spaced positions such as 0, 1, 5, 9, 13… 77.
This design, where a few layers perform full selection and most layers share the result, spreads out the most expensive operation under long context: full-sequence relevance computation. Index selection happens once and later layers reuse it, pushing attention complexity from near-quadratic back toward near-linear. The engineering benefits and risks are equally clear:
- Benefit: first-token latency and memory-bandwidth pressure drop significantly at 1M context;
- Risk: index reuse introduces cross-layer correlation coupling, so tasks that need layer-by-layer fine-grained retrieval (such as multi-point evidence gathering scattered across a very long document) may see recall jitter;
- Tuning points: the gating threshold, index block size, and shared-layer interval all directly affect the balance between saving compute and preserving accuracy.
Pseudocode for the execution flow:
for layer in range(num_layers):if layer in full_indexer_layers: # a few layersidx = indexer.select(tokens) # score all tokens and selectelse:idx = shared_index_cache # reuse the previous layer's indexout = gated_sparse_attention(x, idx) # gated sparse aggregation
4. Shared experts and residual streams: a low-cost source of capacity gains
Routed experts increase from 192 to 256, and the activation strategy changes from Top-8 to Top-8 plus one shared expert. The shared expert is always active for every token and carries general knowledge and stable representations, while routed experts handle differentiated capabilities. This “shared plus routed” combination expands capacity without linearly raising activated parameters, and it also mitigates expert collapse, where a few experts get overused.
The 4 residual streams act like a multi-lane information highway: information from different depths and semantic levels can be preserved in parallel, reducing information dilution in deep layers. The practical implication for developers is that this kind of structure usually benefits more from longer training and more thorough annealing, so a preview version and a final version often differ substantially in capability. That is a reason not to draw final conclusions during the preview stage.
5. Why public evaluations are only for fun: contamination, saturation, and scenario mismatch
Parameters and structure can be compared precisely; capability is much harder to evaluate. There are three reasons:
- Data contamination: questions and answers from public benchmarks are widely present in training corpora, systematically inflating scores;
- Benchmark saturation: common multiple-choice and short-QA tasks are near their ceiling and cannot separate models;
- Scenario mismatch: benchmark tasks differ greatly from real business distributions, and key capabilities such as long-document evidence gathering, tool calling, and structured output are often not covered.
A more reliable approach is to build a private evaluation set: sample 200 to 500 tasks from real business traffic, covering long-context retrieval, multi-turn tool calling, strict JSON-constrained output, code modification, and other dimensions. Use dual-track scoring that combines automated checks with human spot checks, and fix the random seed and decoding parameters so results stay comparable across versions.
6. Cost evaluation: look at cost per successful task, not just unit price
Comparing only the price per million tokens leads to misjudgment. Real cost should be measured as follows:
cost per successful task = (input tokens × input price + output tokens × output price + retry overhead) / task success rate
For long-context scenarios, distinguish between cache-hit and cache-miss pricing, and account for the hidden amplification from failed retries. A 1M-context model with high first-token latency and a high failure rate can end up more expensive end to end even with a lower unit price. Include latency percentiles (P50/P95), success rate, and retry rate in the selection scorecard.
7. Deployment recommendations: treat the preview as a candidate, not a conclusion
- Dual-track in parallel: use the preview for capability probing and the stable version for live traffic;
- Tiered routing: send short requests to a lightweight model, and long documents and complex reasoning to the sparse long-context model;
- Observability: connect logging, monitoring and alerting, and tracing, and track success rate and cost per model;
- Elastic resources: use container platforms and object storage for elastic inference and data archiving, avoiding long-term payment for peak capacity.
8. Conclusion
The core narrative of this generation is trading sparse attention and index reuse for ultra-long context, and trading shared experts for low-cost capacity expansion. For developers, the right approach is not chasing leaderboard numbers but building three things: a private evaluation set, a cost model, and a staged rollout. If you are evaluating ultra-long-context and agent scenarios, you can start with a small-scale validation pipeline using general-purpose model services on Baidu AI Cloud, and let data rather than marketing decide the final choice.
