An AI device based on a large model and an electronic device

By using a stacked configuration of computing and storage modules with division of labor and cooperation in the edge AI device, the problems of storage capacity, bandwidth bottlenecks, computing power, energy efficiency and cost are solved, and more efficient neural network processing is achieved, which is suitable for the deployment of edge devices.

CN225018766UActive Publication Date: 2026-11-24REEXEN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522534309.5
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-11-24
Estimated Expiration
2035-11-27

AI Technical Summary

Technical Problem

Edge AI devices face challenges such as insufficient storage capacity, bandwidth bottlenecks, insufficient computing power, low energy efficiency, poor heat dissipation, and high costs when deploying large models. In particular, when hardware resources are limited, these issues severely restrict the deployment and widespread application of large models.

Method used

The first computing module and the second computing module are stacked with the first storage module and the second storage module, respectively. The storage density of the first storage module is greater than that of the second storage module. The neural network calculation is performed through division of labor and cooperation. The first computing module stores the parameters of the large model, and the second storage module stores the intermediate data, which reduces the amount of data reading and transmission, improves energy efficiency and reduces power consumption.

Benefits of technology

It solves the problems of storage capacity, bandwidth bottlenecks, computing power, energy efficiency and cost, provides greater computing power and higher energy efficiency, reduces heat generation, and is suitable for deployment on edge devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN225018766U_ABST
    Figure CN225018766U_ABST
Patent Text Reader

Abstract

This invention provides an AI device and electronic device based on a large model. The AI ​​device includes: a first computing module; a first storage module stacked and electrically connected to the first computing module; a second computing module electrically connected to the first computing module; and a second storage module stacked and electrically connected to the second computing module. The storage density of the first storage module is greater than that of the second storage module. Both the first and second computing modules include a processor for neural network processing. The first computing module performs neural network calculations based on the signal output by the second computing module and the parameters of the large model in the first storage module. The second computing module performs neural network calculations based on the input data and the data in the second storage module, and obtains the processing result of the AI ​​device based on the result output by the first computing module. The AI ​​device and electronic device provided by this invention can solve problems related to storage capacity, bandwidth, computing power, energy efficiency, and cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to an AI device and electronic device based on a large model. Background Technology

[0002] With the rapid development of artificial intelligence (AI) technology, the role and importance of large AI models are becoming increasingly significant. For example, large language models (LLMs) have become a core driving force for the development of natural language processing (NLP) and generative artificial intelligence (AIGC). Large models correspond to increasingly larger numbers of parameters; for example, the LLM corresponding to DeepSeek has an extremely large number of parameters. Large AI language models achieve unprecedented performance through massive parameters and complex architectures, but also place extremely high demands on computing resources. For example, Chat GPT's training cost reached millions of dollars, and the inference process requires a significant amount of computing power. As the scale of large models continues to expand, on the one hand, the demand for intelligent computing power increases dramatically, and corresponding energy efficiency optimization has become an important research direction; on the other hand, the expansion in the scale of large models has also led to a significant increase in the number of parameters compared to the past. For example, the number of parameters used to be several million, but it has continued to expand to tens of millions or even hundreds of millions of parameters, and now the number of parameters in large models even reaches tens or hundreds of billions. Therefore, the corresponding storage capacity and bandwidth have become important factors restricting the deployment of large models.

[0003] Large-scale models are primarily deployed in the cloud or on edge devices. The main advantages of cloud-based large-scale models include: 1. Powerful computing power: The cloud possesses vast computing, storage, and network resources, enabling efficient processing of large amounts of data and complex computational tasks; 2. Cross-device collaboration: Since computational tasks are completed in the cloud, they are not limited to a single hardware device, thus enabling cross-device collaborative work and providing users with a consistent service experience anytime, anywhere; 3. Rapid model updates: On the cloud platform, models can be quickly updated and maintained, improving their timeliness and accuracy. However, cloud-based large-scale models also face some challenges: 1. Latency and timeliness: Due to the reliance on an internet connection, unstable network conditions may lead to data transmission delays, affecting the execution of real-time tasks; 2. Privacy and security: Transmitting sensitive data to the cloud for processing poses data privacy and security risks, requiring stringent protective measures.

[0004] Edge AI refers to deploying artificial intelligence models directly on terminal devices (such as smart AI smartphones, PCs, robots, and smart wearable devices) to achieve low-latency, high-privacy-protection intelligent applications. Compared to cloud deployment, edge AI can effectively reduce data transmission costs and privacy risks, and has advantages such as faster data transmission speeds and improved user experience. However, edge AI devices have relatively limited computing power and storage capacity, making it difficult to directly deploy and run large models. For example, edge devices struggle to support large models that often require tens of billions of parameters.

[0005] With the rapid development of Large Language Models (LLMs), the demand for their deployment on edge devices is increasing. However, current AI chips face numerous technical bottlenecks when deploying large models, which urgently need to be addressed. For example: First, the storage problem caused by the excessively large model parameters. Large language models typically have hundreds of billions or even trillions of parameters, while edge devices have limited memory capacity. For instance, current mainstream edge chips only support storing millions to tens of millions of parameters. This prevents large models from being stored "completely" on edge devices, significantly limiting the model's scale and performance. Some existing technologies increase storage capacity and parallel processing capabilities by increasing the number of memory units, but this greatly increases the cost and size of AI chips and edge devices. Miniaturization and low cost are crucial competitive advantages for edge devices. Second, large models on chips require frequent reading of model parameters during inference, making storage bandwidth a key factor restricting large model deployment. In particular, the storage bandwidth of current edge chips is insufficient to meet this high-frequency data transfer requirement. This not only leads to a significant decrease in large model inference speed but also makes the user experience of edge AI far inferior to cloud deployment, limiting the widespread application of edge AI. Third, the low energy efficiency of AI chips leads to serious power consumption, battery life, and heat dissipation issues. This is especially true for edge AI chips, which typically rely on battery power and have extremely high requirements for power consumption and battery life – demands that are urgent for users. Just as many manufacturers strive to reduce power consumption, minimize components and device size, and increase battery life – these are often key selling points – current edge AI chips still have relatively low energy efficiency, failing to provide sufficient computing power under low-power conditions. For example, traditional von Neumann architecture chips suffer from "memory walls" and "power walls," causing a significant increase in power consumption when processing large models. This not only shortens device battery life but also leads to severe heat dissipation problems, further limiting the application scenarios and performance of AI chips.

[0006] In summary, AI devices face multiple technical challenges when deploying large-scale models, including insufficient storage capacity, bandwidth bottlenecks, insufficient computing power, low energy efficiency, poor heat dissipation, and high costs. These problems are particularly pronounced for edge-side AI devices, severely hindering the deployment and widespread application of large-scale AI models. Therefore, an innovative technical solution is urgently needed to effectively address these issues; this is especially crucial given the limited hardware resources available at the edge. Summary of the Invention

[0007] The purpose of this invention is to provide AI devices and electronic devices based on large models to solve some or all of the above-mentioned technical problems.

[0008] To achieve the above objectives, the AI ​​device provided by this utility model includes: a first computing module for at least calculation; a first storage module stacked and electrically connected to the first computing module, the first storage module being used to store at least parameters of a large model; a second computing module for at least calculation, the second computing module being electrically connected to the first computing module; and a second storage module stacked and electrically connected to the second computing module, the second storage module being used to store at least intermediate data during the calculation process and the parameters of the large model; the storage density of the first storage module is greater than the storage density of the second storage module; both the first computing module and the second computing module include a processor for performing neural network processing; the first computing module performs neural network calculations based on the signal output by the second computing module and the parameters of the large model from the first storage module, and outputs the calculation result of the neural network calculation performed by the first computing module to the second computing module; the second computing module performs neural network calculations based on the input data and the data from the second storage module, and processes the calculation result output by the first computing module to obtain the processing result of the AI ​​device.

[0009] In a preferred embodiment, the first computing module is used to calculate the feedforward neural network part of the large model based on the parameters of the large model from the first storage module and the signal output by the second computing module, and the second computing module is used to calculate the attention part of the large model based on the input data and the data from the second storage module; or the first computing module is used to calculate the sparse part of the large model based on the parameters of the large model from the first storage module and the signal output by the second computing module, and the second computing module is used to calculate the dense part of the large model based on the input data and the data from the second storage module.

[0010] In a preferred embodiment, the first computing module and / or the second computing module includes: an I / O system for inputting and outputting data; a main processor for preprocessing the input data so that the preprocessed data conforms to the format of the large model; and a plurality of processors for performing neural network processing on the preprocessed input data.

[0011] In a preferred embodiment, the processor is a neural network processor (NPU), which includes: a preprocessing module for converting preprocessed input data into matrix data conforming to the processing format of the computational submodules; several neural network sub-accelerators (SNPUs) for performing neural network processing on the data processed by the preprocessing module, each SNPU including several computational submodules arranged in a matrix to form a computational matrix; a vector processing module (VPU) for performing vector processing on the data processed by the SNPUs; and an on-chip memory for storing intermediate data generated by the computational matrix calculation.

[0012] In a preferred embodiment, the computation matrix included in the SNPU in the first computation module and / or the second computation module is an in-memory computation matrix based on CIM.

[0013] In a preferred embodiment, the in-memory computation matrix includes: N column storage operator modules, each column storage operator module including M rows of storage units for storing and performing computations on the stored data and input feature data.

[0014] In a preferred embodiment, the in-memory computing unit includes: an SRAM memory for storing data from a first storage module and / or a second storage module, and a logic unit for computing disposed adjacent to the SRAM memory.

[0015] In a preferred embodiment, the first computing module is stacked with the first storage module via hybrid bonding, and / or the second computing module is stacked with the second storage module via hybrid bonding.

[0016] In a preferred embodiment, the processor is a CIM-based neural network processor; the first computing module containing the CIM-based neural network processor is stacked with the first storage module via hybrid bonding, and / or the second computing module containing the CIM-based neural network processor is stacked with the second storage module via hybrid bonding.

[0017] In a preferred embodiment, the first computing module is used to perform neural network calculations during the decoding stage of the large model, and the second computing module is used to perform neural network calculations during the pre-filling stage of the large model.

[0018] In a preferred embodiment, the large model is a large model based on a transformer architecture. The first storage module stores at least the parameters of the feedforward neural network of the large model, and the second storage module stores at least the parameters of the attention mechanism of the large model. The first calculation module calculates the feedforward neural network of the large model based on the signal output by the second calculation module and the parameters of the large model in the first storage module. The second calculation module calculates the attention mechanism of the large model based on the input data and the data from the second storage module.

[0019] In a preferred embodiment, the large model is a large model based on the MOE architecture. The first storage module stores at least the parameters of the sparse part of the large model, and the second storage module stores at least the parameters of the dense part of the large model. The first calculation module calculates the sparse part of the large model based on the parameters of the large model from the first storage module and the signal output by the second calculation module, and the second calculation module calculates the dense part of the large model based on the input data and the data from the second storage module.

[0020] In a preferred embodiment, the second computing module is further configured to predict the parameters of the neurons to be activated in the first storage module based on the current input data and the sparsity prediction model; the first computing module selectively reads some experts from the first storage module based on the prediction results of the second computing module, and performs neural network calculations based on the partial experts.

[0021] In a preferred embodiment, the ratio of the number of parameters stored in the first storage module to the bandwidth of the first storage module is greater than the ratio of the number of parameters stored in the second storage module to the bandwidth of the second storage module.

[0022] In a preferred embodiment, the first storage module includes at least two layers of Nand Flash memory, which are stacked using a hybrid bonding method; and / or the second storage module includes at least two layers of DRAM memory, which are stacked using a TSV method or a hybrid bonding method.

[0023] In a preferred embodiment, the AI ​​device further includes an I / O buffer for serial-to-parallel conversion, the I / O buffer being electrically connected between the first storage module and the first computing module.

[0024] In a preferred embodiment, the AI ​​device further includes a packaging substrate, wherein the first storage module, the second storage module, the first computing module, the second computing module, and the packaging substrate are packaged into a whole using a chiplet method.

[0025] In a preferred embodiment, the AI ​​device is an edge-based inference device.

[0026] This utility model also provides an electronic device, including any of the above-mentioned AI devices.

[0027] The AI ​​device provided by this utility model comprises a first computing module and a second computing module stacked with a first storage module and a second storage module, respectively. The first computing module performs neural network calculations based on the signal output by the second computing module and the parameters of a large model read from the first storage module. The second computing module performs neural network calculations based on the input data and the data read from the second storage module, and outputs the processing result of the AI ​​device based on the calculation result output by the first computing module. This allows the first and second computing modules to perform AI-related calculations through division of labor and cooperation, which can reduce the capacity and bandwidth requirements of the two storage modules connected to the two computing modules. The first storage module stores the parameters of the large model, while the second storage module stores intermediate data and parameters of the large model during the calculation process. The storage density of the first storage module is greater than that of the second storage module, allowing the two storage modules to perform different calculations based on the different parameters of the stacked storage modules. For example, the first computing module performs bandwidth-intensive calculations, and the second computing module performs calculations with a lower density. In this system, the second computing module controls the computation of the first computing module. The first computing module reads parameters from the first storage module, which is closely stacked with it, while the second computing module reads data from the second storage module, which is also closely stacked with it. This reduces the amount of data read, transmission, transmission distance, and transmission frequency between the computing modules and storage modules, thereby reducing power consumption, heat generation, and improving energy efficiency. For example, parameters of large models with many parameters but infrequent access are stored in the first storage module, reducing the bandwidth requirements of the first computing module. Meanwhile, intermediate data with fewer parameters that require frequent access are stored in the second storage module, which does not affect the bandwidth requirements of the second computing module for frequent access to the second storage module, further reducing the bandwidth requirements of all storage modules and lowering costs. Furthermore, the division of labor between the first and second storage modules in storing relevant parameters / data allows for the storage of larger amounts of parameters, simultaneously addressing the issues of storage capacity and bandwidth. Furthermore, the two computing modules include processors for neural network processing, which can further improve the energy efficiency of neural network processing and reduce corresponding power consumption and heat generation, thereby solving the heat dissipation problem at its source and providing greater computing power. Therefore, the AI ​​device based on a large model provided by this invention can solve the problems of storage capacity, bandwidth bottlenecks, computing power, energy efficiency, heat dissipation, and cost. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of the frame of an AI device provided in an embodiment of the present invention;

[0030] Figure 2 This is a schematic diagram of the process of neural network processing performed by the AI ​​device in one embodiment of the present invention;

[0031] Figure 3 This is a schematic diagram of the structure of an AI device provided in another embodiment of this utility model;

[0032] Figure 4 This diagram illustrates the architecture of a first / second computing module based on CIM according to an embodiment of the present invention.

[0033] Figure 5 yes Figure 4 A magnified view of the NPU in the middle;

[0034] Figure 6 This is a schematic diagram of a column of stored operator modules in an in-memory calculation matrix in one embodiment of this utility model;

[0035] Figure 7 This is a schematic diagram of the vertical structure of a column of stored operator modules in an in-memory calculation matrix in one embodiment of this utility model;

[0036] Figure 8 This is a schematic diagram illustrating the principle of calculation using an in-memory calculation matrix in one embodiment of this utility model;

[0037] Figure 9 This is a structural block diagram of a neural network processor in one embodiment of the present invention. Detailed Implementation

[0038] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. In the absence of conflict, the following embodiments and their technical features can be combined with each other.

[0039] To make the objectives, technical solutions, and advantages of this utility model clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments, illustrating various exemplary embodiments that may be adopted to implement this utility model. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of this utility model disclosed as detailed in the appended claims, and other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of this utility model.

[0040] In the description of this utility model, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. The term "multiple" means two or more. The terms "connected" and "linked" should be interpreted broadly, for example, they can refer to fixed connections, detachable connections, integral connections, mechanical connections, electrical connections, communication connections, direct connections, indirect connections via an intermediate medium, or connections within two components or interactions between two components. The term "and / or" includes any and all combinations of one or more of the related listed items. Those skilled in the art can understand the specific meaning of the above terms in this utility model according to the specific circumstances.

[0041] AI devices are typically used for training and inference. Currently, an increasing number of AI devices are trained and inferred using large models, making their capabilities increasingly powerful, especially in the widespread application of inference based on large language models. Inference using large language models mainly consists of two phases: the first phase is the prefill phase, which processes the input tokens in parallel; the second phase is the decode phase, which generates the next token sequentially. These two steps are repeated until an EOS (end-of-sequence) token is generated or a user-defined stopping condition is met.

[0042] The AI ​​device based on a large model provided by this utility model can be used to realize AI training, inference and other functions. It can solve problems such as storage capacity, bandwidth, computing power, power consumption, heat dissipation and cost of AI devices such as AI chips.

[0043] See Figures 1 to 3The embodiment shown illustrates that the AI ​​device provided by this invention includes: a first computing module for at least calculations, a first storage module stacked with the first computing module, a second computing module for at least calculations, and a second storage module stacked with the second computing module. The first computing module is electrically connected to the first storage module, and the second computing module is electrically connected to the second storage module. Since the first and second computing modules are also electrically connected, the second computing module can interact with the first computing module. Both the first and second computing modules include a processor for performing neural network processing, enabling the two computing modules to handle AI-related calculations. The processor for performing neural network processing can be any device capable of processing neural networks, such as a GPU, TPU, NPU, or CPU. Figure 1 The example of a processor is the Neural Processing Unit (NPU). Figure 1 In this system, a first computing module includes a first NPU, and the first NPU includes a computation matrix; a second computing module includes a second NPU, and the second NPU includes a computation matrix. A first storage module is used to store at least the parameters of a large model. The first storage module can also be used for computation, for example, to implement the first-level computation of a neural network, and then the first computing module combines the results of the first-level computation to perform neural network computation. A second storage module, used for storage at least, stores intermediate data during the computation process and the parameters of the large model, and the storage density of the first storage module is greater than that of the second storage module. When the AI ​​device is working, the first computing module performs neural network computation based on the signal output by the second computing module and the parameters of the large model read from the first storage module, and outputs the computation result of the neural network computation performed by the first computing module to the second computing module. The second computing module performs neural network computation based on the input data of the AI ​​device and the data read from the second storage module (e.g., including the parameters of the large model from the second storage module and the intermediate data in the second storage module), and the intermediate data generated during the computation process of the second computing module is stored in the second storage module. The second computing module is also used to output the processing result of the AI ​​device based on the computation result output by the first computing module. In other words, the second calculation module can combine its own calculation results with those of the first calculation module to obtain the processing result of the AI ​​device. Correspondingly, the second calculation module acts as the main input / output interface of the AI ​​device. It can perform calculations based on externally input data and control the calculations of the first calculation module based on the externally connected main control chip and the input feature data. For example, the second calculation module determines how to perform calculations based on control commands from the externally connected main control chip and the input feature data, and outputs command signals to the first calculation module to control how the first calculation module performs its calculations.

[0044] This invention utilizes a first and a second computing module to perform AI-related computational processing through division of labor, and storage modules stacked with each computing module to store various parameters / data related to the large model in a categorized manner. This allows the AI ​​device provided by this invention to achieve a division of labor similar to the left and right hemispheres of the human brain, making the AI ​​device more efficient and intelligent. By dividing the tasks of the first and second computing modules for AI-related calculations, the capacity and bandwidth requirements of the storage modules stacked with each computing module are reduced. The first storage module stores the parameters of the large model, while the second storage module stores intermediate data from neural network calculations and the parameters of the large model. The storage density of the first storage module is greater than that of the second storage module. This division of labor between the two storage modules allows each computing module stacked with the two storage modules to perform different calculations based on the different parameters / data of the closely stacked storage modules. For example, the first computing module performs bandwidth-intensive calculations, while the second computing module performs less bandwidth-intensive calculations. The second computing module controls the calculations of the first computing module. Furthermore, the first computing module primarily reads parameters from the first storage module, which is closely stacked with it, while the second computing module primarily reads parameters / data from the second storage module, which is also closely stacked with it. This reduces the amount of data reads, transmissions, transmission distances, and transmissions between computing and storage modules, thereby reducing power consumption, heat generation, and improving energy efficiency. For example, parameters of a large model with many parameters but infrequent access are stored in the first storage module. This allows the first computing module to avoid frequent access to the first storage module, reducing its bandwidth requirements. The first computing module also avoids reading data from the second storage module (avoiding the need for frequent access to and reading of parameters from the storage module even when only one storage module and one computing module are present). Meanwhile, intermediate data with fewer parameters but frequent access is stored in the second storage module, which is closely stacked with the second computing module. Correspondingly, the second computing module does not need to access or read parameters from the first storage module. This does not affect the bandwidth requirements of the second computing module for frequent access to the second storage module, and also reduces the bandwidth requirements of all storage modules, thus reducing costs. Furthermore, the first and second storage modules divide the storage of relevant parameters, allowing them to store a larger amount of parameters and simultaneously addressing the issues of storage capacity and bandwidth. Moreover, both computing modules include processors for neural network processing, which further improves the energy efficiency of neural network processing and reduces power consumption and heat generation, thus solving the heat dissipation problem at its source and providing greater computing power. This avoids the problems of size, power consumption, and even stability associated with trying to increase heat sinks and other heat dissipation methods in existing technologies.

[0045] Furthermore, since the second storage module and the second computing module are stacked, and the first computing module and the first storage module are also stacked, the transmission path of parameters that need to be read / written between the computing modules and the storage modules is shorter, the transmission time is shorter, the transmission volume can be larger, and the computing power is greater, enabling faster and more efficient processing of various neural networks. It can also further improve the energy efficiency of the AI ​​device and reduce corresponding power consumption and heat generation, thus solving the heat dissipation problem at its source and solving it faster and better. It is also easier to package into a single unit with a smaller size. Therefore, the AI ​​device based on a large model provided by this invention can effectively solve the problems of storage capacity, bandwidth bottlenecks, computing power, energy efficiency, heat dissipation, and cost.

[0046] It is worth noting that the form of the first storage module, the second storage module, the first computing module, and the second computing module is not limited. They can be, for example, block-shaped or layered, and they can be in the form of chips or dies.

[0047] Combination Figure 2 The following embodiments illustrate the general working process of the AI ​​device provided by this utility model:

[0048] First, in step S10, the input data of the AI ​​device is transmitted to the second computing module.

[0049] In step S20, the second computing module outputs a signal controlling how the first computing module performs calculations based on the input data, and the second computing module performs neural network calculations based on the input data and the data in the second storage module. When the second storage module stores a dense, large model, and the first storage module stores a sparse, large model, the second computing module typically requires greater computing power for calculations; the first computing module performs calculations with less computing power than the second computing module.

[0050] In step S30, the first calculation module performs neural network calculations based on the signals output by the second calculation module and the parameters of the large model read from the first storage module, and outputs the calculation results to the second calculation module.

[0051] In step S40, the second calculation module processes its own calculation results and the calculation results output by the first calculation module to obtain the processing result of the AI ​​device. For example, the second calculation module combines the calculation results of the first and second calculation modules, packages them into a corresponding format, and outputs them as the processing result of the AI ​​device.

[0052] The first storage module, second storage module, first computing module, and second computing module can have different functions depending on the needs of the AI ​​device. In a preferred embodiment, the first computing module mainly performs calculations on the sparse part of the large model. The first computing module performs the calculations on the sparse part of the large model based on the parameters of the large model stored in the first storage module and the signal output by the second computing module. The second computing module performs the calculations on the dense part of the large model based on the input data and data from the second storage module. Alternatively, the first computing module performs the calculations on the feedforward neural network (FNN) part of the large model based on the parameters of the large model from the first storage module and the signal output by the second computing module. The second computing module performs the calculations on the attention part of the large model based on the input data and data from the second storage module. This division of labor allows the first and second storage modules to store relevant parameters more selectively, choosing storage devices more suitable for their respective needs. The first and second computing modules can also better divide their tasks to focus on their respective strengths. For example, bandwidth-intensive calculations can be performed by the first computing module, while less bandwidth-intensive calculations can be performed by the second storage module. The first computing module performs relatively simple calculations, while the second computing module performs relatively complex calculations. For example, the first computing module performs the final calculation in the neural network processing and outputs the result to the second computing module. The second computing module performs calculations for other parts of the neural network and combines the results from the second computing module with the output of the second computing module to obtain the output of the AI ​​device. This can further improve the storage capacity, bandwidth, energy efficiency, and cost of the AI ​​device. For example, when the first storage module stores most of the parameters of a large model, due to its higher storage capacity requirements, it can use a lower-cost and higher-density Flash memory. The second storage module is used to store intermediate data during the calculation process and a small portion of the parameters of the large model. Since the amount of intermediate data is small and needs to be accessed frequently, the second storage module can use DRAM memory. DRAM memory has a faster read / write speed and can achieve high-density interconnection. Thus, the AI ​​device, especially a complete AI chip, can simultaneously solve the problems of storage capacity and bandwidth, while reducing power consumption and cost.

[0053] To better adapt to AI processing of large models with a larger number of parameters, preferably, the large model is a Transformer-based model. The first storage module stores at least the parameters of the feedforward neural network of the large model, and the second storage module stores at least the parameters of the attention mechanism of the large model. The first calculation module performs calculations on the feedforward neural network of the large model based on the instruction signal output by the second calculation module and the parameters of the large model from the first storage module. The second calculation module performs calculations on the attention mechanism of the large model based on the input data and the data from the second storage module. In this way, the accuracy of the calculations by the first and second calculation modules can be higher, thereby improving the accuracy of the AI ​​device processing.

[0054] To achieve faster AI processing response, higher efficiency, and lower power consumption in the AI ​​device, the large model is preferably based on a MOE (Hybrid Experts) architecture. The first storage module stores at least the parameters of the sparse part of the large model, and the second storage module stores at least the parameters of the dense part. The first calculation module performs calculations on the sparse part of the large model based on the parameters from the first storage module and the signal output from the second calculation module. The second calculation module performs calculations on the dense part of the large model based on the input data and the data from the second storage module. Correspondingly, the AI ​​device can select only a subset of experts to participate in AI processing during operation, thus improving AI processing efficiency and reducing energy consumption and heat generation. This makes the first and second calculation modules similar to the left and right hemispheres of a human brain, each handling different calculations. In this embodiment, the first calculation module can perform calculations requiring relatively low computing power, while the second calculation module can perform calculations requiring high computing power, such as calculations for a high-computation matrix module. For example, the second calculation module performs calculations for the preceding modules, while the first calculation module only needs to perform the final MOE calculation. Correspondingly, since the first storage module, stacked with the first computing module, stores sparse large models, this reduces the bandwidth requirements of the first storage module and allows the first computing module to access and perform fewer calculations. Consequently, the second computing module does not need to access or read data from the first storage module storing sparse large models. Conversely, the second storage module, stacked with the second computing module, stores dense large models. This reduces the storage capacity and cost requirements of the second storage module, and when performing high-power calculations, the second computing module only needs to access the closely stacked second storage module more frequently. In other words, the second computing module does not need to frequently access and move data from the first storage module, which is some distance away. Therefore, this embodiment can reduce the bandwidth requirements of the AI ​​device to solve bandwidth bottlenecks, provide larger storage capacity, reduce data movement, reduce power consumption, and reduce heat generation.

[0055] In a preferred embodiment, the first computing module is used to perform neural network calculations in the decoding stage of a large model, and the second computing module is used to perform neural network calculations in the pre-filling stage of the large model. This allows the second computing module, with its greater computing power, to complete the pre-filling stage calculations, while the first computing module, with less computing power, performs the decoding stage processing. It can also leverage the high bandwidth of the second storage module stacked with the second computing module, thereby improving the training / inference efficiency of the AI ​​device and reducing related power consumption. For example, the first computing module and the first storage module (e.g., NAND flash memory) together implement the feedforward neural network (FNN) part of the decoding stage, while the remaining calculations (e.g., the neural network calculations in the pre-filling stage) are implemented by the second computing module and the second storage module (e.g., DRAM memory). This significantly reduces the computing power on the NAND side, especially if the second computing chip / module is used as the main control chip, where the second computing chip already has significant computing power. In this case, the first computing module can adopt a structure with slightly less computing power, which can greatly reduce the computing power on the NAND side, as well as reduce NAND power consumption, reduce bit error rate, and lower cost.

[0056] To illustrate the technical solution of this utility model, the following is a description... Figure 3 The preferred embodiment shown is described in detail below, illustrating only the parts relevant to this embodiment. In this preferred embodiment, the first storage module is a Flash storage module, formed by stacking multiple Flash layers, and the second storage module is a DRAM storage module, formed by stacking multiple DRAM memories. The Flash storage module stores large language model parameters based on a Hybrid Expert (MOE) architecture, and the DRAM storage module stores MLA (Multi-head Latent Attention) parameters. The first computation module (i.e., the computation layer Die on the left in the figure) performs MOE calculations for large model inference based on the MOE parameters stored in the Flash storage module and the signals output by the second computation module (i.e., the computation module on the right in the figure). The second computation module performs MLA calculations for large model inference based on the input data and the MLA parameters read from the DRAM storage module. Correspondingly, the traversal-related calculations, i.e., calculations requiring low computational power, are completed by the computation module on the left. It is worth noting that the aforementioned low computational power calculation by the first computation module mainly refers to the fact that the computational power of the first computation module is relatively small compared to that of the second computation module. In reality, the first computation module can also perform calculations requiring higher computational power. For example, the number of in-memory computing units in the first computing module and / or the second computing module can be set according to the application requirements of the AI ​​device, thereby setting the computing power of the first computing module and / or the second computing module.

[0057] In one embodiment, the first storage module includes multiple Nand Flash memories. Nand Flash memories are characterized by high storage density and low storage cost. They read data in blocks, resulting in lower costs, making them suitable for large-capacity storage and offering a long lifespan. They are well-suited for storing model parameters in large-scale AI model deployments on edge devices. While Flash memories have large capacities, their data transfer rates are low, making it difficult to meet the bandwidth requirements of real-time inference. Correspondingly, the densely accessed MLA parameters are stored in the second storage module and read and computed by the second computing module, which is tightly stacked with the second storage module. This avoids the need for the second computing module to move data and consume power when it is located far away from the first storage module and the first computing module.

[0058] exist Figure 3 In the illustrated embodiment, the Nand Flash memory stores the parameters of the sparse part of the large language model based on the Hybrid Expert Architecture (MOE). It differs from the Transformer architecture (Dense model) in that the Transformer architecture shares all parameters between its input and output, is fully connected, and all parameters are activated and participate in computation, such as the fully connected layers in CNNs and Transformers. The core idea of ​​the MOE model is to design multiple "experts" (sub-networks) within the model, and use a gating mechanism to activate only a subset of these experts for computation on each input or token. Figure 3 The middle calculation module (Die, on the left) is the first calculation module mentioned above. Figure 3 The middle computing module (Die, right side) is the aforementioned second computing module. In the AI ​​device provided by this invention, the model capacity can be significantly increased in terms of parameter scale, while only a small portion of the parameters actually participate in the calculation. For example, only some experts are activated during inference, thus achieving a higher parameter utilization rate within a unit inference time, achieving a certain "computing power economy" effect. Furthermore, this invention, through the collaboration of the first and second storage modules (first and second storage modules) with the first and second computing modules, can achieve a division of labor in computation similar to the left and right hemispheres of the human brain, making its AI processing capabilities stronger and more efficient.

[0059] To significantly increase memory bandwidth in AI devices and thus improve the response speed of artificial intelligence processing, preferably, 3D-stacking technology is used to stack the first computing module with the first storage module using hybrid bonding, and / or the second computing module with the second storage module using hybrid bonding. For example, Figure 1In this invention, a second computing module containing a second neural network accelerator (second NPU) is stacked with a DRAM storage module via hybrid bonding. The DRAM stacked with the second computing module provides a large storage capacity (e.g., 12 / 24 / 36GB), allowing for the storage of dense, large models. Conversely, a first computing module containing a first neural network accelerator is stacked with a Flash storage module via hybrid bonding. The Flash storage module has a large storage capacity, low bandwidth, and low cost, and stores sparse, large models, thus ensuring both the computational and storage capacity requirements for AI processing while achieving low cost. Furthermore, this invention utilizes hybrid bonding to achieve a 3D stacked structure of storage modules and computing modules with specific structures in the AI ​​device, enabling high-density, high-performance interconnection between different chips. Hybrid bonding allows for the precise alignment and direct bonding of the metal layers (usually copper layers) of two or more chips, forming direct electrical contacts. It can achieve submicron and even nanometer-level interconnect spacing, allowing more connection points to be placed in a smaller area, greatly increasing the data communication bandwidth between chips. Its contact density can reach 10K-1MM / mm2. Hybrid bonding, by eliminating intermediate media such as solder, results in lower resistance in direct copper-to-copper connections, reducing energy loss during signal transmission and also reducing signal propagation time delay. The compact structure and direct conductive path formed by hybrid bonding help improve thermal management and reduce heat generation, thus enabling higher integration, faster data transmission speeds, greater bandwidth, and lower power consumption. Thanks to the high-density interconnects of hybrid bonding, its bandwidth can be exponentially improved. 3D stacked DRAM integrating hybrid bonding can achieve bandwidths of 1-10TB / s or even higher, a significant improvement over other state-of-the-art GDDR6 and HBM3E technologies. Moreover, its energy requirement for transmitting a single bit of data is significantly reduced to 0.7pJ / bit, greatly reducing the power consumption of data transfer.

[0060] See Figure 4 and Figure 5This is a schematic diagram of the structure of the first / second computing module based on computing in memory (CIM). In this embodiment, the processor with neural network processing capabilities is an NPU, which includes an in-memory computing matrix. It achieves computing in memory through the in-memory computing matrix. Computing in memory aims to overcome the "memory wall" problem by integrating storage and computing functions onto the same chip. This technology embeds computing power into memory and uses a new computing architecture to achieve matrix-vector multiplication and accumulation operations. Therefore, it can reduce the frequent data transfer between memory and computing chips in existing technologies, thereby greatly reducing transfer time, power consumption, and heat generation, and improving the parallel processing efficiency of data; it achieves in-situ computing, eliminates bandwidth limitations and data movement costs. This fundamentally eliminates unnecessary data transfer delays and power consumption, improving AI computing efficiency by hundreds or thousands of times, reducing costs, and breaking down the "memory wall" and "power wall." It allows the AI ​​device containing the first and second computing modules to have greater computing power, consume less power, and generate less heat compared to existing devices performing calculations under the same conditions, thus solving the existing heat dissipation problem at its source. The computation of AI large model inference chips includes a large number of matrix multiplication calculations (multiply-accumulate MAC), which account for 30-70% of the overall chip power consumption. Therefore, the AI ​​device with CIM-based computing module of this invention can provide high computing power, low power consumption, high energy efficiency, and low heat, and can effectively solve the heat dissipation problem.

[0061] It is worth noting that traditional storage devices (such as memory chips) typically cannot withstand ambient temperatures exceeding 85 degrees Celsius. Existing computing chips generally have high power consumption, resulting in significant heat generation from them and AI devices containing them. This makes it easy for ambient temperatures to exceed the 85-degree limit, leading to increased leakage current in storage devices under these high-temperature conditions. Furthermore, this necessitates higher refresh rates for the storage devices, further increasing their power consumption, creating a vicious cycle that has a significant impact on AI devices. The AI ​​device provided in this application combines two computing modules (including a CIM-based NPU) and two storage modules, improving computing power and efficiency while reducing both power consumption and heat generation. This fundamentally solves the power consumption and heat dissipation problems, thereby addressing the aforementioned issues at their source.

[0062] In this invention, the first NPU included in the first computing module on the left and the second NPU included in the second computing module on the right may have the same structure, only differing in computing power; or they may have different structures. See also Figures 4 to 8 In the preferred embodiment shown, the first computing module and / or the second computing module may include multiple sub-NPU clusters. Figure 4The intermediate computing module (which can be either the first or the second computing module) includes: an I / O system for inputting and outputting data; and a main processor (i.e., Figure 4 The system includes a RISC-V-CPU for preprocessing input data to conform to the format of the large model. This involves operations such as normalization, resizing, and encoding of input data (e.g., text, images, or sensor data) to fit the large model's input format. Several processors are then used to perform neural network processing on the preprocessed input data. This implementation can improve the computing power and energy efficiency of AI devices, while reducing power consumption and heat generation.

[0063] The computation module, which includes an NPU based on the CIM architecture, can handle matrix operations and parallel computations during large model execution. This module also handles quantization and optimization tasks; it supports model quantization (such as INT8 quantization), reducing computational complexity and memory consumption while maintaining model accuracy and improving inference speed. The computation module can include multiple sub-NPU clusters. See also... Figure 5 In the illustrated embodiment, each neural network accelerator (NPU) (i.e., the aforementioned neural network processor (NPU), which can be either the first NPU or the second NPU) includes: a pre-processing module (i.e., Pre-Processing in the figure), used to convert the pre-processed input data into matrix data conforming to the processing format of the in-memory computing module; several neural network sub-accelerators (SNPUs), used to perform neural network processing on the data processed by the pre-processing module; and a vector processing module (VPU), used to perform vector processing on the data processed by the SNPUs. The figure illustrates that the four sub-accelerators, SNPU0 to SNPU3, are connected to the bus in parallel. Each SNPU includes several computing sub-modules arranged in a matrix to form a computing matrix. Figure 5 The SNPU includes several CIMs (CIMs are the aforementioned computational submodules; the CIMD shown in the diagram is a digital CIM). These CIMs are arranged in a matrix to form an in-memory computation matrix.

[0064] The NPU also includes on-chip memory (such as...). Figure 5The on-chip SRAM (Simplified Chinese RAM) can be used to store intermediate data generated during computational matrix calculations. The on-chip SRAM cache and DMA (Direct Memory Access) system in the computing module handle memory management and data transfer optimization during large language model inference. On-chip memory can store large model parameters and intermediate data, reducing access to off-chip memory (such as DRAM) and lowering memory bandwidth bottlenecks. Optimizing memory access modes (such as sequential access and batch loading) and using DMA technology reduces memory management burden. The computing module provided in this embodiment has advantages such as high computing power, high energy efficiency, high computational accuracy, low cost, and low power consumption.

[0065] It is worth noting that if the processor provided by this utility model is a GPU, CPU or other types of processor, the processor can be stacked with the storage module through a hybrid bonding method, which can also improve the storage capacity and bandwidth of the AI ​​device.

[0066] In summary, the AI ​​device provided by this utility model, especially the inference device, can solve the existing storage capacity and bandwidth bottlenecks to support large bandwidth and high computing power. Furthermore, the entire inference device reduces power consumption in many ways, solves the existing heat dissipation problem, and greatly improves cost.

[0067] It is worth noting that in AI devices, the cost of memory typically accounts for the majority of the overall cost. However, to support large models (e.g., hundreds of billions of parameters) and run large models with massive parameter counts, existing technologies require a significant increase in the amount of memory, leading to a sharp rise in the overall cost and a larger size of the AI ​​device. Edge AI devices, especially AI smartphones with their limited space, have very high requirements for both low cost and small size, placing even greater constraints on their size. Therefore, the AI ​​device provided by this invention selectively loads the parameters of large models into two different storage modules, allowing parameters / data to be categorized and moved between different storage devices and different computing modules, thereby reducing the number and cost of memory. Especially... Figure 3The AI ​​device shown can solve the storage capacity and bandwidth issues by using less Flash memory and less DRAM memory. By arranging the computing module, Flash memory module, and DRAM memory module according to the aforementioned location structure, the number, size, and cost of storage devices in the AI ​​device can be significantly reduced, thereby greatly reducing the size and cost of the AI ​​device. Furthermore, it can provide large storage capacity, high bandwidth, high computing power, and high energy efficiency. It is particularly suitable for edge-side highly sparse scenarios, especially edge-side inference devices, and can effectively solve the storage capacity, bandwidth bottlenecks, computing power, energy efficiency, and cost issues associated with deploying large models on the edge.

[0068] See Figure 6 In a preferred embodiment of this invention, the in-memory computation matrix includes: N columns of in-memory operator modules. Each column of in-memory operator modules includes: M rows of in-memory units for storing and calculating the stored data with input feature data, and capacitors electrically connected to the in-memory units. The charges output by the capacitors in the M rows are pooled together to achieve charge accumulation. Therefore, the in-memory units can store and perform multiplication calculations on the weight parameters and input feature data. The corresponding products are accumulated through the capacitors connected to the in-memory units to achieve multiply-accumulate (MAC) calculations in neural network computation. That is, matrix calculations can be performed within the in-memory computation matrix, which avoids the frequent data transfer between two different and geographically distant memories and computing chips in the prior art. Multiply-accumulate calculations typically account for a large portion of the total power consumption of a computation, often ranging from 50% to 70%. This invention, based on an in-memory computing architecture, incorporates a neural network accelerator with an in-memory computing matrix within the computing module. This enables two-dimensional and three-dimensional matrix multiplication / addition operations through a novel computational architecture, significantly reducing the power consumption of neural network computations. Furthermore, it allows for a smaller neural network accelerator area, enabling greater computing power with less heat generation within the same area and power consumption, thus addressing heat dissipation issues. The computing module, including the in-memory computing matrix, is stacked with a second storage module using a hybrid bonding method, further alleviating the bandwidth limitations of this AI device. It also boasts high computing power, small size, and low cost.

[0069] See Figure 7 The diagram shown is a vertical structural schematic of a column of stored-operator submodules in an in-memory computation matrix, according to an embodiment of the present invention. Each stored-operator unit includes an SRAM memory and a logic unit (i.e., digital logic in the figure) adjacent to the SRAM memory for computation. Multiple stored-operator units are stacked to form a column, and several columns of stored-operator units form a stored-operator matrix. The aforementioned logic unit can be used to perform multiplication and addition calculations on the weights and input feature data in the SRAM memory. Figure 7The diagram also showcases a block diagram of Integrated In-Memory Computing (CIMD). CIMD significantly reduces the power consumption of data transfer while greatly increasing the speed of parallel multiply-accumulate (MAC) calculations, effectively alleviating the two major challenges of the 'memory wall' and the 'power wall'. SRAM memory and the logic units used for computation are stacked adjacently, allowing for a more compact in-memory computing matrix structure, greater computing power, lower power consumption, and faster and more accurate computation speed when combined with digital logic units. As shown in Table 1, at the 12nm process node, the matrix multiplication energy efficiency ratio of the CIMD in-memory computing unit can reach 24.7 TOPS / W, an order of magnitude improvement compared to traditional digital architectures (i.e., general-purpose computing units, such as GPUs and TPUs). CIMD significantly reduces the power consumption of data transfer while greatly increasing the speed of parallel multiply-accumulate (MAC) calculations. Thanks to this innovative underlying computing unit architecture, in-memory computing technology can significantly improve the energy efficiency ratio of AI Large Model (LLM) inference chips, meaning that computing power remains constant while significantly reducing power consumption requirements.

[0070]

[0071] Table 1

[0072] Further preferably, the second computing module is also used to predict the parameters of neurons to be activated in the first storage module based on the current input data and the sparse prediction model; the first computing module selectively reads some experts from the first storage module based on the prediction results of the second computing module, and performs neural network calculations based on these experts. For example, the second computing module performs the above predictions based on the sparse prediction model stored in its internal memory. This allows the first computing module to only read some necessary parameters and perform calculations based on only these necessary parameters, thereby further reducing the back-and-forth data transfer between storage modules and computing modules, reducing the amount of data transfer, reducing power consumption, reducing heat generation, and improving the efficiency of the AI ​​device. It can also greatly alleviate the bandwidth bottleneck and allow the storage module to support large models with a larger number of parameters. Moreover, utilizing the high sparsity characteristics of the MLP, when performing large model inference operations, a simple low-rank prediction model (e.g., a two-layer MLP) is used to predict in real time which neurons will be activated. Each time a large model is inferred, only the parameters of neurons in the activated state need to be dynamically loaded from the Flash storage module. This solution can significantly reduce the amount of model parameters that need to be read from the Flash storage module, while also greatly reducing the power consumption and bandwidth requirements for data transfer from the Flash storage module.

[0073] In a preferred embodiment, the storage density of the first storage module is greater than that of the second storage module, thereby enabling the first storage module to store larger models with a greater number of parameters, while the second and first storage modules as a whole still maintain good storage capacity and bandwidth. More preferably, the ratio of the number of parameters stored in the first storage module to its bandwidth is greater than the ratio of the number of parameters stored in the second storage module to its bandwidth. For example, the ratio of the number of parameters stored in the Flash storage module to its bandwidth is A, and the ratio of the number of parameters of the large model stored in the DRAM storage module to its bandwidth is B, where A is greater than B. This allows the first and second storage modules to be two different types and functions, enabling the selective transfer of different parameters between storage and computation modules. For example, sparse parameters in a large model can be stored in the Flash storage module, while dense parameters and intermediate data can be stored in the DRAM storage module (dense parameters typically refer to model parameters that are frequently accessed and involved in large-scale computations during large model training / inference, while sparse parameters typically refer to model parameters that are less frequently accessed during large model training / inference). This reduces the amount of data transferred, the power consumption during data transfer, and the heat generated during data transfer, while also reducing memory costs and effectively utilizing bandwidth and alleviating bandwidth bottlenecks.

[0074] Figure 8 This is a schematic diagram illustrating the principle of in-memory computation matrix calculation in one embodiment of this utility model. The in-memory computation unit performs multiplication calculations on the input feature data and weights, and then accumulates the product through a multi-level addition tree to obtain the result of multiplication and accumulation.

[0075] See Figure 9The illustrated embodiment of this utility model shows a schematic diagram of the framework of a neural network accelerator (NPU, also called a neural network processor). The NPU includes: a preprocessing module, an in-memory computation matrix, and a vector processor, all electrically connected in sequence; and a shared memory electrically connected to the preprocessing module, the in-memory computation matrix, and the vector processor, respectively. It also includes a chip controller electrically connected to the shared memory. The NPU is also electrically connected to an external memory, and data stored in the external memory is transferred to the NPU's shared memory in batches. For example, weights are read from the external memory in batches and transferred to the shared memory. One possible operating mode is briefly described as follows: the preprocessing module obtains input feature data from the shared memory, processes the input feature data into matrix data in the format of an in-memory computation matrix, and inputs the matrix data into the in-memory computation matrix; the in-memory computation matrix performs convolution calculations based on the matrix data and the weight data to obtain a calculation result, and inputs the calculation result into the vector processor; the vector processor performs vector processing on the calculation result to obtain output feature map data, and writes the obtained output feature map data into the shared memory and / or the external memory. Figure 9 The NPU in the system has fast neural network processing speed, low power consumption, and high accuracy, which can improve the training and propagation efficiency and accuracy of AI devices. It also has low power consumption, low heat generation, and strong battery life.

[0076] In a preferred embodiment of this invention, the first or second storage module can also be used for computation to implement the first-level computation of the neural network. The first and second computation modules complete the neural network computation based on the results of the first-level computation. That is, simple computations can also be performed in the storage module, such as the first multiplication based on the multiplication parameters, i.e., the first-level computation. The result of the first-level computation is transmitted to the NPU for accumulation computation to complete the neural network computation. This fully utilizes the storage module, reduces the computational load of the computation module, and thus reduces the power consumption of the computation module. Furthermore, after the first-level computation, the data transfer from the storage module to the computation module can be reduced, correspondingly reducing the demand for storage and high bandwidth.

[0077] The first and second storage modules can be of various types. Preferably, the first storage module is a non-volatile storage module, and / or the second storage module is a volatile storage module. Specifically, the first storage module on the left stores parameters of a large model that are not updated or are updated infrequently, while the intermediate data stored in the second storage module on the right requires frequent updates. This allows the AI ​​device to have better fault tolerance and stability, while also better balancing storage capacity and cost. More preferably, the first storage module is a Flash storage module, and the second storage module is a DRAM storage module. This enables the AI ​​device provided by this invention to support large storage capacity, higher bandwidth, greater computing power, and higher energy efficiency at a lower cost. In other words, it better balances storage capacity, bandwidth, efficiency, power consumption, and cost. In particular, it can provide a higher-performance edge AI inference device at a lower cost. Further preferably, the second storage module includes at least two layers of DRAM memory, and the at least two layers of DRAM memory are stacked together via TSV (Through Silicon Vias) or hybrid bonding. This allows for the vertical stacking of multiple memories (e.g., memory chips), significantly improving memory bandwidth and reducing power consumption. It enables large-capacity, high-bandwidth storage, meeting the stringent memory requirements of high-performance computing, artificial intelligence, and other fields. Moreover, when the second storage module stores intermediate data generated during the computation of the second computing module, it allows frequently accessed intermediate data during high-performance computations such as MLA to be directly stored in the adjacent DRAM memory. This effectively utilizes the bandwidth advantage of DRAM and reduces the path and distance for data transport by the second computing module, thereby improving the efficiency and energy consumption of the second computing module.

[0078] In a preferred embodiment of this invention, the Flash storage module includes multiple stacked Nand-Flash memories, which are stacked using a hybrid bonding method. This further improves the bandwidth of the first storage module, reduces its size, increases its data transfer efficiency, and reduces the power consumption during data transfer. The AI ​​device provided by this invention can take various forms, such as an AI chip. Furthermore, the AI ​​device can also be in module form.

[0079] As shown in Table 2, the 3D stacked DRAM with integrated Hybrid Bonding can achieve a bandwidth of 1-60TB, which is a significant improvement over other advanced GDDR6 and HBM3E technologies. At the same time, its energy requirement for transmitting a single bit of data is also greatly reduced to 0.5pJ / bit, which greatly reduces the power consumption of data migration. It can solve the bandwidth bottleneck problem encountered in the deployment of edge AI large model (LLM) chips, and at the same time significantly reduce the power consumption of data migration.

[0080]

[0081] Table 2

[0082] In a preferred embodiment, the AI ​​device further includes a packaging substrate, and the Flash memory module, DRAM memory module, first computing module, second computing module, and packaging substrate are packaged together as a single unit using a chiplet method. This enables efficient interconnection between the small chips.

[0083] The first and second computing modules can be directly electrically connected or indirectly connected. For example, the first and second computing modules can also be electrically connected and interact with data through an intermediary. The AI ​​device provided by this utility model stacks different computing modules and different storage modules separately, allowing the intermediary to expand to include more computing and storage modules for different calculations and division of labor. For example, in a preferred embodiment, a third computing module is also provided on the intermediary, and a third storage module is stacked on the third computing module. This can adapt to more large models, expand bandwidth, further expand the functionality of the AI ​​device, and increase its scalability and application flexibility. Furthermore, if the first and second computing modules in chip form are electrically connected together through an intermediary module, such as an organic intermediary module, it can achieve compatibility with multiple process technologies, reduce costs, and improve the flexibility of the device. Preferably, the intermediary module is a silicon intermediary module, so that the first storage module and computing modules connected by the intermediary module can have ultra-high interconnect density, better electrical connection performance, reduced parasitic effects, and also help with chip heat dissipation.

[0084] In a preferred embodiment, the intermediary is a Chip2Chip intermediary layer (e.g., Figure 3(As shown). It has lower requirements for materials and processes, especially for packaging (e.g., lower requirements for advanced packaging), resulting in higher yield and lower cost for the corresponding AI device. Furthermore, it allows the first computing module on the left to directly complete the MOE calculation, reducing the need for data transfer and lowering the power consumption of the AI ​​device. The first and second computing modules can be electrically connected via Chip2Chip or Die2Die, thereby improving the stability and reliability of the electrical connection between the two computing modules and reducing the size of the AI ​​device.

[0085] More preferably, the AI ​​device further includes an I / O buffer for serial-to-parallel conversion (i.e., Figure 3 The IO buffer (Die) is electrically connected between the first storage module and the first computing module. This allows the AI ​​device to have higher data bandwidth when transmitting data.

[0086] In summary, this invention provides a novel AI device that addresses the current bottlenecks in storage capacity, bandwidth, power consumption, computing power, and heat dissipation encountered by large-model-based AI devices, particularly edge-side large-model inference devices. It can better solve these technical problems even with limited edge-side hardware resources, significantly improving storage capacity and bandwidth while reducing power consumption. This enables large-capacity, high-bandwidth storage, meeting the stringent memory requirements of high-performance computing and artificial intelligence, and is also cost-effective.

[0087] The AI ​​device provided by this invention can take various forms, such as a chip or a module, and can be widely used in various AI devices, such as mobile phones, computers, and robots.

[0088] This invention also provides an electronic device including the aforementioned AI device. It can significantly reduce the power consumption and cost of electronic devices, while improving the efficiency and experience of AI training and inference. It can be widely used in smartphones, tablets, wearable electronic devices, smart home devices, and other electronic products.

[0089] The above are merely preferred embodiments of the present utility model. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present utility model. Furthermore, under the teachings of the present utility model, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present utility model. Therefore, the present utility model is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present utility model.

Claims

1. An AI device based on a large model, characterized in that, include: The system includes a first storage module for storing parameters of a large model, a second storage module for storing intermediate data generated during neural network computation and parameters of the large model, a first computation module for neural network computation, and a second computation module for performing neural network computation based on input data and data from the second storage module, and processing the computation results output by the first computation module to obtain the processing result of the AI ​​device. The first storage module is stacked and electrically connected to the first computing module, the second computing module is electrically connected to the first computing module, and the second storage module is stacked and electrically connected to the second computing module. The storage density of the first storage module is greater than the storage density of the second storage module. Both the first computing module and the second computing module include a processor for performing neural network processing. The first computing module is used to perform neural network calculations based on the signal output by the second computing module and the parameters of the large model from the first storage module.

2. The AI ​​device according to claim 1, characterized in that, The first computing module and / or the second computing module include: An I / O system is used for inputting and outputting data. The main processor, electrically connected to the IO system, is used to preprocess the input data so that the preprocessed input data conforms to the format of the large model; and The processors, which are electrically connected to the main processor, are used to perform neural network processing on the preprocessed input data.

3. The AI ​​device according to claim 2, characterized in that, The processor is a neural network processor (NPU), which includes: The preprocessing module is used to convert the preprocessed input data into matrix data that conforms to the processing format of the calculation submodule; Several neural network sub-accelerators (SNPUs) electrically connected to the preprocessing module are used to perform neural network processing on the data processed by the preprocessing module. Each SNPU includes several computational sub-modules, which are arranged in a matrix to form a computational matrix. A vector processing module electrically connected to the neural network sub-accelerator SNPU is used to perform vector processing on the data processed by the SNPU; and On-chip memory is used to store intermediate data generated by the computation matrix calculation.

4. The AI ​​device according to claim 3, characterized in that, The computation matrix included in the SNPU in the first computation module and / or the second computation module is an in-memory computation matrix based on CIM.

5. The AI ​​device according to claim 4, characterized in that, The in-memory computation matrix includes: N columns of storage operator modules, each column of storage operator module including M rows of storage units for storing and performing computations on the stored data and input feature data.

6. The AI ​​device according to claim 5, characterized in that, The storage and computing unit includes: an SRAM memory for storing data from a first storage module and / or a second storage module, and a logic unit for calculation disposed adjacent to the SRAM memory.

7. The AI ​​device according to claim 1, characterized in that, The first computing module is stacked with the first storage module via hybrid bonding, and / or the second computing module is stacked with the second storage module via hybrid bonding.

8. The AI ​​device according to claim 7, characterized in that, The processor is a CIM-based neural network processor; The first computing module, which includes a CIM-based neural network processor, is stacked with the first storage module via hybrid bonding, and / or the second computing module, which includes a CIM-based neural network processor, is stacked with the second storage module via hybrid bonding.

9. The AI ​​device according to any one of claims 1 to 8, characterized in that, The large model is a large model based on the transformer architecture. The first storage module stores at least the parameters of the feedforward neural network of the large model, and the second storage module stores at least the parameters of the Attention of the large model. The first calculation module is used to calculate the feedforward neural network of the large model based on the signal output by the second calculation module and the parameters of the large model from the first storage module. The second calculation module is used to calculate the Attention part of the large model based on the input data and the data from the second storage module.

10. The AI ​​device according to any one of claims 1 to 8, characterized in that, The large model is a large model based on the MOE architecture. The first storage module stores at least the parameters of the sparse part of the large model, and the second storage module stores at least the parameters of the dense part of the large model. The first calculation module is used to calculate the sparse part of the large model based on the signal output by the second calculation module and the parameters of the large model from the first storage module. The second calculation module is used to calculate the dense part of the large model based on the input data and the data from the second storage module.

11. The AI ​​device according to any one of claims 1 to 8, characterized in that, The ratio of the number of parameters stored in the first storage module to the bandwidth of the first storage module is greater than the ratio of the number of parameters stored in the second storage module to the bandwidth of the second storage module.

12. The AI ​​device according to any one of claims 1 to 8, characterized in that, The first storage module includes at least two layers of Nand Flash memory, which are stacked using a hybrid bonding method; and / or The second storage module includes at least two layers of DRAM memory, and the at least two layers of DRAM memory are stacked by TSV method or hybrid bonding method.

13. The AI ​​device according to any one of claims 1 to 8, characterized in that, The AI ​​device also includes an I / O buffer for serial-to-parallel conversion, which is electrically connected between the first storage module and the first computing module.

14. The AI ​​device according to any one of claims 1 to 8, characterized in that, The AI ​​device also includes a packaging substrate, wherein the first storage module, the second storage module, the first computing module, the second computing module, and the packaging substrate are packaged together as a whole using a chiplet method.

15. The AI ​​device according to any one of claims 1 to 8, characterized in that, The AI ​​device is an edge-based inference device.

16. An electronic device, characterized in that, The AI ​​device includes any one of claims 1-15.