Training Trillion-Parameter LLMs on Domestic Compute: A Deep Dive into Sparse Attention and 1M Context
This article explores the engineering practices behind training a 1.6-trillion-parameter Large Language Model using domestic AI accelerators. It examines the dual-version strategy leveraging the Mixture of Experts (MoE) architecture, the implementation of Dynamic Sparse Attention (DSA) for 1-million-token contexts, and the engineering challenges and ecosystem impacts of shifting from compute scaling to architectural innovation.
1. From “Stacking Compute” to “Architectural Innovation”: A New Stage for LLMs
In recent years, discussions about Large Language Model (LLM) capabilities have largely been predicated on the backing of top-tier overseas GPU clusters. Training a model with hundreds of billions or even trillions of parameters seemed inherently tied to specific hardware ecosystems.
However, recent technological progress offers a new answer. Multiple sources indicate that teams in China have successfully completed the training of a massive model with up to 1.6 trillion parameters. The entire workflow, from training to inference, runs on domestic AI accelerators (such as domestic training chips). The significance of this milestone lies not in “surpassing a specific competitor,” but in validating an engineering pathway:
The technical ceiling of large-scale models can be approached through architectural innovation under constrained hardware conditions.
This reflects a broader trend: when hardware supply is constrained, the optimization space at the software and algorithm levels is maximized. Technologies including the Mixture of Experts (MoE) architecture, sparse attention, low-precision computation, and communication compression have transitioned from being “nice-to-haves” to “necessities.”
2. Dual-Version Strategy: One Model, Two Trade-offs
The released model series employs a dual-version strategy with clear positioning:
| Version | Total Parameters | Activated Parameters | Context Window | Positioning |
|---|---|---|---|---|
| Flagship | ~1.6 Trillion | ~49B | 1M token | Competes with top closed-source models |
| Lite | ~284 Billion | ~13B | 1M token | Faster and more economical |
Here are two technical details worth expanding upon:
1. Trillion Parameters ≠ Trillion Compute Volume
Thanks to the MoE architecture, although the total model parameters reach 1.6 trillion, only about 49B parameters are activated during each forward inference pass. This means:
- Storage costs are calculated based on total parameters, requiring massive distributed memory.
- Compute costs are calculated based on activated parameters, significantly reducing inference latency and energy consumption.
This is a classic design that decouples “parameter scale” from “inference cost.”
2. 1M Context Becomes Standard
Both versions support a 1M token context window. Two years ago, long context was an exclusive capability of leading closed-source models, and a 128K window was already industry-leading. Today, 1M context is becoming an open, commercially viable foundational capability.
To use an analogy: while luxury brands are still selling limited editions, others have turned similar technologies into industrial products, supplying them openly at extremely low prices. This has a structural impact on the downstream application ecosystem.
3. Dynamic Sparse Attention: Fitting 750K Words into “Cache”
A 1M context window sounds impressive, but what truly excites engineers is the underlying implementation. The model utilizes a Dynamic Sparse Attention (DSA) mechanism, providing two core benefits:
- Compute volume reduced to approximately 27% of the previous generation — not a 30% increase, but a 73% reduction in invalid computation.
- KV Cache reduced to approximately 10% — drastically lowering the memory pressure for long contexts.
3.1 Why Standard Attention Cannot Sustain Long Contexts
The self-attention mechanism of the standard Transformer suffers from an O(n²) complexity problem: doubling the sequence length quadruples the compute volume. When the context reaches 1 million tokens:
Sequence length n = 1,000,000Attention compute volume ∝ n² = 10^12 (trillions of comparisons/layer)KV Cache memory ∝ n × number of layers × number of heads × head dimension
Under conventional implementations, the memory overhead required just to cache the Keys/Values of all tokens is enough to overwhelm most inference clusters.
3.2 Engineering “Selective Memory”
When humans read long texts, they do not pay equal attention to every word—the brain automatically filters key information and quickly skims irrelevant paragraphs. The concept behind Dynamic Sparse Attention is similar:
- Importance Evaluation: Calculates a “worth noting” score for each token.
- Dynamic Routing: Only high-scoring tokens participate in full attention computation; the rest go through a lightweight pathway.
- Cache Eviction: Low-value historical states in the KV Cache are compressed or discarded.
Illustrative pseudocode:
scores = relevance(query, cached_keys) # Evaluate relevance of historical tokenstop_k = select_topk(scores, k=cache_budget)attn = attention(query, cached_kv[top_k]) # Full computation only on critical subsetkv_cache.update(compress(new_kv)) # Compress and write to control cache size
The direct effect of this design is that the marginal cost of long context shifts from “linear explosion” to “controllable growth.” The context length that the same hardware can support has increased by an order of magnitude.
4. Engineering Challenges on Domestic Compute Pipelines
Training a trillion-parameter model on domestic chips is not a simple “hardware replacement”; it requires the reconstruction of an entire software stack:
Operator Adaptation: New structures like sparse attention and MoE routing require rewriting high-performance operators tailored for domestic AI accelerators, involving low-level optimizations such as matrix tiling strategies and on-chip memory scheduling.
Distributed Training: The communication topology, gradient synchronization strategies, and fault recovery mechanisms of a 10,000-card cluster must deeply match the interconnect bandwidth characteristics of the chips.
Inference Deployment: The significant compression of the KV Cache increases the concurrency and context length that a single card can serve, directly improving the unit cost on the inference side.
The accumulation of this work holds value beyond a single model—they form a reusable software ecosystem for domestic compute.
5. What This Means for Developers and Enterprises
- The barrier to long-context applications drops sharply. Stuffing an entire book, a whole code repository, or complete conversation history directly into the context is now a reality, offering a new alternative to the “retrieval accuracy bottleneck” of RAG.
- Cost structure changes. Sparse computation combined with KV Cache compression drastically reduces the unit token cost for long text processing. Previously uneconomical scenarios (such as full code auditing and ultra-long document summarization) are becoming viable.
- Supply chain resilience. Decoupling core model capabilities from overseas hardware provides enterprises with an additional autonomous and controllable path when making technology selections.
- Richer ecosystem choices. With sufficient model capabilities and open deployment methods, enterprises can combine general infrastructure like cloud container platforms, object storage, and monitoring alerts to build complete privatized AI solutions.
6. Conclusion
The essence of this round of technological evolution is another victory of “architectural innovation offsetting hardware constraints.” A trillion-parameter model running entirely on a domestic compute pipeline means there is more than one solution to compute bottlenecks: besides waiting for more powerful chips, you can design smarter algorithms.
For developers, what is worth noting is not just the benchmark scores of a specific model, but the general methodology behind it—sparsification, selective computation, and cache compression. These are becoming the standard engineering paradigm for large-scale AI systems. Understanding these principles is more important than chasing every benchmark run.
