AI NPU Architecture Evolution, Software Open-Sourcing, and Large Model Adaptation Practices

    This article explores the technical evolution of domestic AI NPUs across four key dimensions: mobile "big core + micro core" architecture evolution, comprehensive open-sourcing of the base software stack, fine-grained expert parallel adaptation for large models, and practical developer guidelines. Discover how these advancements are shaping the AI computing ecosystem from edge devices to data centers.

    As artificial intelligence rapidly advances, the demand for underlying computing power for large model training and inference has grown exponentially. Neural Processing Units (NPUs), designed specifically for deep learning, play a crucial role in both mobile devices and data centers. In recent years, domestic AI NPUs have made significant progress in hardware architecture innovation, foundational software ecosystem development, and large model adaptation. This article explores the technical evolution and practical pathways of NPUs, covering architecture evolution, software open-sourcing, large model adaptation, and development practices.

    1. Mobile NPU Architecture Evolution: An Energy Efficiency Revolution through Big and Micro Core Collaboration

    On the mobile side, constrained by device power consumption and thermal limits, traditional general-purpose processors struggle to meet the demands of edge AI applications. Consequently, modern mobile SoCs commonly integrate dedicated NPUs. In terms of architectural design, the “big core + micro core” heterogeneous collaborative computing approach has become a representative industry solution.

    1. Functional Division of Big Cores and Micro Cores
      Big core NPUs typically feature high peak computing power to handle high-load AI scenarios, such as complex image semantic segmentation, real-time video quality enhancement, or intensive on-device large model inference. Micro core NPUs focus on ultra-low power routine computing, such as voice wake-up or face unlock while the screen is off. Through hardware-level task scheduling, the system dynamically wakes the appropriate cores based on the workload.
    2. Energy Efficiency Optimization Mechanism
      The core advantage of this architecture is that it eliminates the power waste associated with running all cores at high frequencies. Micro cores use minimalist instruction sets and streamlined data paths to maintain basic AI perception at milliwatt-level power consumption; the big core is activated only when complex tensor operations are required. This design significantly extends device battery life while ensuring a smooth edge AI experience.

    2. Comprehensive Open-Sourcing of AI Base Software Stacks: Breaking Down Ecosystem Barriers

    Powerful hardware alone is insufficient; the performance release of an NPU relies heavily on the underlying software stack. In recent years, leading industry vendors have announced the comprehensive open-sourcing of their AI base software core stacks, a move with profound implications for the entire AI ecosystem.

    1. Open-Source Content and Tech Stack Layering
      Typically, a complete AI software stack includes underlying drivers, operator libraries, graph compilers, and inference/training framework adaptation layers. Open-sourcing means developers can dive into the underlying layers to understand the instruction set architecture of the tensor computing cores and directly participate in the development and optimization of high-performance operators. Simultaneously, open-source graph compilers allow developers to perform customized graph fusion for specific network structures, reducing memory read/write overhead in intermediate layers.
    2. Value for Developers
      In the closed-source era, when encountering unsupported operators or performance bottlenecks, developers could only submit tickets to vendors and wait for fixes, resulting in long iteration cycles. With comprehensive open-sourcing, developers can analyze operator time-consuming data generated by profiling tools to locate bottlenecks themselves. They can even write custom operators by modifying underlying C++ code or using Domain-Specific Languages (DSL), drastically shortening the algorithm deployment cycle.

    3. NPU Adaptation and Fine-Grained Expert Parallelism in the Era of Large Models

    As the parameter count of Large Language Models (LLMs) scales to hundreds of billions, the memory and computing power of a single accelerator card can no longer meet training and inference demands. In early 2026, a mainstream large model series announced the completion of adaptation for domestic NPUs, successfully validating a fine-grained expert parallel scheme. This marked a critical step for NPUs in ultra-large-scale cluster computing.

    1. Challenges Brought by the MoE Architecture
      Mixture of Experts (MoE) models expand the parameter count without significantly increasing computational load by introducing a sparse activation mechanism. However, MoE models require distributing different expert networks across multiple cards, leading to memory fragmentation and surging communication overhead. When NPU clusters handle All-to-All communication, network topology and routing algorithm design can easily become system bottlenecks if not properly optimized.
    2. Analysis of the Fine-Grained Expert Parallel Scheme
      The core idea of fine-grained expert parallelism is to further decompose massive expert networks into smaller computing units and map them onto NPU clusters more flexibly. In this scheme:
      • Load Balancing: Dynamic routing monitors the memory usage and compute queue length of each NPU, preventing certain cards from being overloaded with popular experts while others sit idle.
      • Communication Optimization: Utilizing high-speed interconnect buses between NPUs (such as HCCS), control flow and data flow are separated. Before transmitting tensors, tokens are sorted and reorganized to reduce the number of small packets in cross-node communication, improving bandwidth utilization.
      • Operator Fusion: For the gating networks and expert computations in MoE, the underlying base software stack provides dedicated fused operators. This merges multiple matrix multiply-accumulate and activation operations into a single NPU instruction call, reducing Kernel Launch overhead.

    4. Developer Practice Guide: Operator Development and Tuning Based on NPUs

    For application developers and algorithm engineers, how can the computing power of NPUs be fully utilized? Below is a general practice workflow and code example.

    1. Model Migration and Operator Adaptation
      When migrating models trained using open-source frameworks (like PyTorch) to NPUs, the first step is to check operator coverage. The base software stack typically provides automated conversion tools to map native operators to NPU-native operators.
    2. Custom Operator Development Example
      If encountering an unsupported special activation function, developers can write custom operators through the Python interface provided by the software stack. The following pseudocode example demonstrates how to register a simple custom operator:
    1. import native_ai_backend as nab
    2. # Define the computation logic of the operator (compiled to NPU instructions at the underlying level)
    3. @nab.custom_op("MyCustomActivation")
    4. def custom_activation(x):
    5. # Assume we need to implement a leaky square root activation function
    6. return nab.where(x > 0, nab.sqrt(x), x * 0.01)
    7. # Register the operator into the graph
    8. def build_model(input_tensor):
    9. # Regular network layer
    10. x = nab.nn.linear(input_tensor, out_features=1024)
    11. # Call the custom operator
    12. x = custom_activation(x)
    13. return x
    1. Performance Tuning Best Practices
      • Memory Reuse: In large model inference, the memory footprint of the KV Cache is extremely high. It is recommended to enable the memory pooling mechanism in the base software stack to reduce memory fragmentation caused by dynamic allocation.
      • Combining Pipeline and Tensor Parallelism: In multi-card NPU environments for ultra-large models, it is recommended to use Tensor Parallelism (TP) for attention mechanisms and Pipeline Parallelism (PP) for layer stacking. Leverage the communication operators provided by the software stack to hide computation and communication latency.

    Conclusion

    From the energy efficiency innovation of mobile “big core + micro core” architectures, to the comprehensive open-sourcing of base software stacks, to the successful validation of fine-grained expert parallelism for large models, domestic NPUs are building a complete AI computing ecosystem spanning from edge to cloud and from hardware to software. For developers, deeply understanding the architectural characteristics and underlying software mechanisms of NPUs will become a core competitive advantage in building high-performance applications in the AI 2.0 era. Moving forward, as hardware-software co-design continues to deepen, NPUs will unleash even greater technological dividends across more vertical industries.