Architecture Analysis and Practice of Next-Generation Ultra-Sparse MoE Large Models

    This article provides a technical analysis of a next-generation ultra-sparse Mixture-of-Experts (MoE) large language model. By integrating a shallow Transformer structure, hybrid attention mechanisms, and native multimodal capabilities, this architecture significantly reduces inference costs while achieving substantial performance gains. Readers will gain insights into the core design logic, technical innovations, and cost-benefit analysis for enterprise-level deployment.

    With the rapid development of large language models (LLMs), the “brute force” approach of simply scaling up parameters to improve performance is facing diminishing returns in terms of computational cost and efficiency. Recently, a lightweight large model was released that attracted widespread attention. Through a novel underlying architecture design, it achieves generational performance improvements while drastically reducing inference costs. This article strips away specific product attributes to deeply analyze the model’s core architecture from a technical perspective and explore the underlying technological evolution trends.

    1. Core Architecture: Balancing Ultra-Sparse MoE and Shallow Transformers

    The model employs an ultra-sparse Mixture-of-Experts (MoE) architecture with approximately 320B total parameters but only 18B activated parameters per forward pass. This design significantly reduces the computational overhead of a single inference while preserving the model’s overall knowledge capacity.

    In terms of specific configurations, the model adopts a relatively shallow 45-layer Transformer structure with 288 routed experts, selecting only 8 experts per token for activation. Notably, the first three layers utilize a dense structure. The logic here is that shallow networks are primarily responsible for extracting basic syntax and general features; using dense structures ensures the stability of foundational representations. Deeper networks, on the other hand, leverage MoE to achieve knowledge distribution and specialization.

    The pseudo-code below illustrates the basic routing logic of the ultra-sparse MoE:

    1. def forward_moe_layer(hidden_states, num_experts_per_tok=8):
    2. # The first three layers are Dense, passing directly through the FFN
    3. if current_layer < 3:
    4. return dense_ffn(hidden_states)
    5. # Calculate routing weights (batch_size, seq_len, 288)
    6. router_logits = linear_router(hidden_states)
    7. # Select the Top-8 experts
    8. topk_indices, topk_weights = topk(router_logits, k=num_experts_per_tok)
    9. # Only activate the selected 8 experts for computation
    10. expert_output = compute_selected_experts(hidden_states, topk_indices)
    11. return combine_outputs(expert_output, topk_weights)

    2. Attention Mechanism Innovation: Hybrid Orchestration of Linear and Sparse Attention

    To address the memory and computational pressure brought by ultra-long contexts, the model introduces a hybrid attention mechanism. Out of the 45 layers, only 11 employ the commonly used Sparse Attention, while the remaining 34 use Linear Attention, generally following an alternating orchestration principle of 3 layers of Linear Attention followed by 1 layer of Sparse Attention.

    The core idea of this design is division of labor:

    1. Linear Attention: Features lower computational complexity, making it suitable for processing continuous context and extracting local information. It accounts for the vast majority of layers.
    2. Sparse Attention: Used for precise long-distance retrieval, deployed every few layers to ensure the model does not lose critical long-range dependencies in ultra-long contexts.

    Furthermore, an IndexPool mechanism is introduced in the Sparse Attention, compressing the index keys at a ratio of approximately 4:1. According to official data, this optimization reduces Attention computation by about 3 times and KV Cache usage by about 4.4 times. In actual cloud-native deployments, this significant reduction in memory means that under the same GPU computing power (such as standard GPU instances provided by public clouds like Baidu AI Cloud), the model can support larger concurrent requests or longer context windows.

    3. Residual Network Optimization: mHC Mechanism Supporting Shallow Structures

    Shallow networks typically face the issue of insufficient representational capacity. To extract sufficient deep semantic information within a 45-layer shallow structure, the model introduces a manifold-constrained hyper-connection (mHC) mechanism.

    Traditional Transformers primarily pass information through inter-layer residual connections. In contrast, the mHC mechanism uses more complex residual information mixing, allowing information to efficiently skip and fuse between non-adjacent layers. This topological change expands the pathways for information propagation without increasing network depth, effectively compensating for the potential performance loss caused by a shallow architecture. As a result, although the model activates only about 18B parameters per token, its base model capabilities rival or even surpass some deeper models with 40B activated parameters.

    4. Native Multimodal and Ultra-Long Context Capabilities

    Built on a newly trained foundation base, the model uses over 30T of multimodal pre-training data and natively supports a context length of up to 1M, along with image and video inputs. This is fundamentally different from traditional “plug-in” multimodal adapters.

    In AI agent scenarios, the 1M native context means the model can ingest the entire context of a code repository, lengthy API documentation, or continuous video frame sequences in a single pass, without relying on complex chunking and Retrieval-Augmented Generation (RAG) strategies. This significantly simplifies the application development process while reducing the risk of information loss caused by chunk truncation.

    5. Performance and Cost-Benefit Analysis

    Architectural innovations bring significant commercial value. While maintaining a lightweight profile, the model’s overall benchmark scores surpass the previous generation of mainstream models, and it approaches top-tier industry benchmark models in coding and agent tasks. In the six coding and agent benchmarks officially released, it shows significant advantages in tasks such as automated testing and software engineering.

    More crucially, costs have dropped significantly. Thanks to the ultra-sparse MoE and hybrid attention architecture, the inference cost per task can be as low as $0.05, about one-tenth of the previous generation model. This cost structure makes large-scale automated agent operation feasible.

    6. Summary and Outlook

    In summary, the release of this model is not just a product iteration but a comprehensive validation of the next-generation large model architecture: Ultra-Sparse MoE + Shallow Transformer + Linear/Sparse Hybrid Attention + mHC + IndexPool + Native Multimodal.

    For enterprise developers, such architectural trends mean that future private deployments or cloud API calls will require greater attention to underlying compute scheduling and memory optimization strategies. For instance, when deploying such MoE models using container platforms and GPU clusters, network communication optimization for expert parallelism will become a critical bottleneck. As model capabilities continue to increase and costs decrease, the deep integration of large models into complex business systems will usher in an explosive period.