End side model lightweight calculation method based on parameter decomposition and recombination learning gene, product and deployment method
By using the method of parametric decomposition and recombination of learning genes, the deployment challenge of Transformer models on resource-constrained devices is solved, enabling lightweight and flexible deployment of image generation models, adapting to the needs of heterogeneous edge environments, and improving the model's adaptability and stability.
Patent Information
- Application Number
- CN202511486999.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-09
AI Technical Summary
Existing Transformer models have high computational overhead in image generation tasks, making them difficult to deploy flexibly on resource-constrained devices. Furthermore, existing pre-trained models cannot adapt to the storage and computational requirements of heterogeneous edge environments.
By employing the method of parametric decomposition and recombination of learning genes, the parameter matrix of the Transformer model is factored into a shared parameter matrix, a layer-specific parameter matrix, and a core tensor. The model size is determined based on the edge task resources and scenario. The learning genes are used for initialization and fine-tuning to form a lightweight edge network model.
It enables the efficient deployment of lightweight and scalable image generation models on resource-constrained devices, reducing computation and storage costs, improving the model's adaptability and stability, and enabling it to adapt to different hardware environments.
Smart Images

Figure CN121303201A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of lightweight deployment of image generation task models, in particular to an end-side model lightweight computing method based on parameter decomposition and reorganization learning genes, a product and a deployment method. BACKGROUND
[0002] In the prior art image generation technology, a Transformer model architecture is often used to perform image generation. The Transformer architecture has shown strong modeling capability in recent years in generative artificial intelligence tasks, however, such models are often accompanied by large parameter sizes and high computational overheads in actual training and inference processes, and the optimization process is lengthy and heavily dependent on hardware resources, thereby limiting its application to resource-constrained devices.
[0003] In order to reduce the cost of model training and migration, researchers have proposed parameter-efficient fine-tuning strategies. Such methods usually insert a small number of trainable modules into a frozen backbone network to achieve task adaptation. Although such methods improve the model migration efficiency to some extent, they still rely on a complete pre-trained model as a prerequisite, making it difficult to meet the differentiated storage and computing conditions of various devices. At the same time, with the rapid growth of the size of pre-trained models, directly transplanting them to terminal or edge devices has faced great challenges.
[0004] In actual deployment, different hardware environments (such as mobile terminals, Internet of Things nodes and edge computing platforms) have significant differences in model size and computational complexity requirements, and developing generative models that can be flexibly adjusted in size has become a key direction. However, existing pre-trained models are mostly provided in a single or limited size, and if complete pre-training is performed for each possible model configuration, it will result in excessive resource consumption and deployment costs. Therefore, how to ensure the performance of the generation task while providing lightweight, scalable and easily initialized models for heterogeneous end-side environments has become a technical problem that needs to be solved. SUMMARY
[0005] In view of the problems in the prior art, the purpose of the present application is to provide an end-side model lightweight computing method based on parameter decomposition and reorganization learning genes, a product and a deployment method, which can provide lightweight, scalable and end-side models for heterogeneous end-side environments.
[0006] In order to achieve the above-mentioned application purpose, the present application provides the following technical solutions:
[0007] An end-side model lightweight computing method based on parameter decomposition and reorganization learning genes, comprising the following steps:
[0008] (1) selecting a Diffusion Transformer as a base network model of an end-side task, the end-side task being an image generation task;
[0009] (2) pre-training the base network model, and factorizing a parameter matrix of the base network model into a shared parameter matrix, a layer-specific parameter matrix and a core tensor during the pre-training process, and taking the shared parameter matrix as a learning gene; wherein the shared parameter matrix is a parameter matrix irrelevant to a network size and shared across layers in the base network model, the layer-specific parameter matrix is a parameter matrix recording difference information of each layer, and the core tensor is a parameter matrix capturing interaction relationship and weight between layers;
[0010] (3) determining a size of an end-side network model according to a computing resource of an end-side terminal performing the end-side task and an application scenario of the end-side task, selecting a plurality of layers from the base network model according to the size, and forming a network structure of the end-side network model;
[0011] (4) initializing a shared parameter matrix of the end-side network model with the learning gene obtained by decomposing the base network model, randomly initializing a layer-specific parameter matrix of the end-side network model, and performing unit initialization on the core tensor, and pre-training.
[0012] (5) fine-tuning the pre-trained end-side network model with an end-side task data set to obtain a lightweight end-side network model.
[0013] Further, the step (2) specifically comprises:
[0014] (2.1) setting a relationship expression of the parameter matrix of the selected base network model and the shared parameter matrix, the layer-specific parameter matrix and the core tensor:
[0015]
[0016] wherein, is the parameter matrix of the base network model, is the core tensor, is the shared parameter matrix, is the layer-specific parameter matrix, indicates that the decomposition is obtained by training constraint reverse fitting, , , are mode products of tensors and matrices in the first, second and third modes (modes), respectively, that is, multiplication operations along different dimensions and corresponding factor matrices, r represents a rank of the core tensor, used to control potential dimensions and compression ratios of the decomposed tensor, m1 represents a size of an input feature dimension, m2 represents a size of an output feature dimension, and N represents a number of model layers;
[0017] (2.2) Using the training constraints to inversely fit the values of the shared parameter matrix, the layer-specific parameter matrix and the core tensor with the optimization objective of minimizing the prediction loss.
[0018] Further, the optimization objective is:
[0019]
[0020]
[0021] wherein, represents a network model with parameters , represents a loss, is a prediction value of the base network model; and is input information of the base network model.
[0022] Further, step (3) specifically comprises:
[0023] (3.1) Evaluating the computing resources of the end-side terminal to obtain the upper limit of the video memory / memory , the upper limit of the single inference delay , and the average energy consumption budget , thereby forming a resource constraint triple ;
[0024] (3.2) Determining the performance target according to the application scenario of the end-side task, and defining the minimum performance standard of the end-side network model;
[0025] (3.3) Selecting the size of the end-side network model that satisfies the resource constraint triple and the minimum performance standard;
[0026] (3.4) Extracting a number of layers from the base network model to form the network structure of the end-side network model with the size specified in step (3.3).
[0027] Further, step (4) specifically comprises:
[0028] (4.1) Mapping the decomposed learning genes to the corresponding layers of the end-side network model, and forming the shared parameter matrix of the end-side network model by mapping the parameters of all layers of the end-side network model;
[0029] (4.2) According to the size of the end-side network model, constructing the layer-specific parameter matrix and the core tensor of the end-side network model, and initializing the core tensor as an identity tensor and the layer-specific parameter matrix randomly.
[0030] (4.3) obtaining a dataset of part of the basic training model, pre-training the initialized end-side network model, and only training the layer-specific parameter matrix or simultaneously training the layer-specific parameter matrix and the core tensor during the pre-training.
[0031] Further, step (5) specifically comprises:
[0032] (5.1) obtaining an end-side task dataset;
[0033] (5.2) training the pre-trained end-side network model using the end-side task dataset, with the goal of minimizing loss;
[0034] (5.3) after completing the training of the end-side network model, evaluating the performance of the end-side network model, and if the performance reaches a preset threshold, completing the fine-tuning of the end-side network model.
[0035] Further, the basic network model is a Transformer or a variant thereof.
[0036] A computer program product comprising a computer program which, when executed by a processor, implements the above method.
[0037] A computer device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the computer program to implement the above method.
[0038] A lightweight end-side model deployment method based on parameter decomposition and reorganization learning genes, which deploys the end-side network model calculated by the above method to a corresponding end-side terminal.
[0039] Compared with the prior art, the present application has the following advantages:
[0040] Firstly, the present method does not need to perform complete pre-training for each model size. By decomposing and refining the parameters of the pre-trained model, obtaining cross-task and cross-scale shared learning genes, and separating them from the scale-related specific parameters, the present application can directly initialize the end-side model using the learning genes, thereby significantly reducing the computational and storage costs caused by repeated training.
[0041] Secondly, the present method has good flexibility and scalability. Existing methods often lack a unified initialization mechanism between different scale models, and need to additionally trim or modify the network structure. However, the present application utilizes the cross-scale reusable characteristics of learning genes to quickly adapt the model under various computing conditions and hardware environments, supporting the deployment of mobile terminals, edge computing devices and other heterogeneous platforms.
[0042] In addition, the method effectively improves the convergence efficiency and adaptation ability of the model in the end-side task. In the end-side deployment process, only the small-scale data of the scale-related lightweight parameters need to be quickly optimized to obtain better initial performance, and the model effect is further enhanced during subsequent full-parameter fine-tuning.
[0043] Finally, the application takes into account the stability and generalization ability of the model while maintaining parameter efficiency. By fixing the shared learning genes and only updating the scale-specific parameters, the application can inherit stable and reliable knowledge from the ancestor model and adjust flexibly according to the requirements of downstream tasks, thereby still having good adaptability and expansibility in resource-limited environments. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is a flowchart of a lightweight end-side model deployment method based on parameter decomposition and recombination of learning genes provided by an embodiment of the application, and a schematic diagram;
[0045] Figure 2 is a structural schematic diagram of a transformer;
[0046] Figure 3 is a schematic diagram of a pre-training method of a basic network model provided by an embodiment of the application;
[0047] Figure 4 is a schematic diagram of an initialization method of an end-side network model provided by an embodiment of the application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application.
[0049] Embodiment one
[0050] An embodiment of the application provides a lightweight end-side model deployment method based on parameter decomposition and recombination of learning genes, as shown in Figure 1 , specifically comprising:
[0051] (1) Diffusion Transformer (DiT) is selected as a basic network model of an end-side task, and the end-side task is an image generation task.
[0052] The Transformer network architecture can implement most types of tasks, and in this embodiment, the Transformer network architecture can be selected as a basic network model. The Transformer contains N layers of stacked Block, as shown in Figure 2 , each layer of Block is composed of the following main components: multi-head self-attention module (MSA) and point-wise feed-forward layer (PFF).
[0053] Multi-Head Self-Attention Module (MSA): includes H attention heads, in the i-th attention head, the input features are mapped via a parameter matrix to a parameter , the output is:
[0054]
[0055] D is the hidden dimension, is the number of sampling steps.
[0056] After the outputs of all H attention heads are spliced, the output of the MSA is obtained by mapping via a projection matrix
[0057]
[0058] To improve efficiency, the parameter matrices of the H attention heads of one Block can be combined into a multi-head self-attention parameter matrix , and further considering that there are N Blocks in common, they can be combined to form , denotes the total multi-head self-attention parameter matrix of the N Blocks; similarly, the projection matrices of the N Blocks can be combined into a projection matrix .
[0059] Point-wise Feed Forward Network (PFF): composed of two linear layers, the input linear layer and the output linear layer, the parameter matrices are , and a GELU activation function is set between the two linear layers:
[0060]
[0061] wherein, , is the bias, denotes the input features of the input linear layer, denotes the GELU activation function, denotes the output of the point-wise feed forward network.
[0062] Considering that there are N Blocks, the parameter matrices of the input linear layer and the output linear layer of the N Blocks can be regarded as .
[0063] Therefore, the parameters of the basic network model can be represented as: .
[0064] (2) Pre-train the basic network model and factorize the parameter matrix of the basic network model during the pre-training process to obtain the shared parameter matrix, layer-specific parameter matrix and core tensor. Use the shared parameter matrix as the learning gene.
[0065] Traditional methods often directly decompose the parameter matrix of the network model. This approach results in parameter redundancy and fails to efficiently capture patterns or knowledge shared across layers, which can easily lead to storage redundancy and reduced migration performance.
[0066] To address the aforementioned issues, this invention proposes a Tucker decomposition method for cross-layer sharing during pre-training, which involves directly setting the parameter matrix shared across layers. And retain the layer-specific parameter matrix and core tensor matrix Thus we get:
[0067]
[0068] in, The core tensor is used to capture the interaction relationships and importance weights between various modes (input mode, output mode, layer mode). As a "learning gene" shared across layers, it can represent general knowledge independent of model size. A layer-specific parameter matrix records the differences between layers; "" indicates that the decomposition is not a direct decomposition result, but is obtained through backfitting with training constraints. , , represents the modal product of the tensor and the matrix in the 1st, 2nd, and 3rd modes, respectively, i.e., the multiplication operation with the corresponding factor matrix along different dimensions. r represents the rank of the core tensor, which is used to control the potential dimension and compression ratio of the tensor after decomposition. m1 represents the size of the input feature dimension, m2 represents the size of the output feature dimension, and N represents the number of model layers.
[0069] In the cross-layer sharing scheme of the present invention, to avoid parameter redundancy, without loss of generality, it can be... Set to a unit tensor, meaning it does not explicitly learn the core tensor, but only relies on the shared one. T is used to characterize the structure of the weight tensor.
[0070] like Figure 3 As shown, this invention does not first decompose each layer independently and then directly use the decomposition results; instead, it sets... The parameters to be learned are shared across layers, and then a Tucker-constrained pre-training process is performed by minimizing the training loss during assisted training. Figure 3 middle, ,…, This represents the set of layer-specific parameters of the QKV projection matrix in the self-attention modules of layers 1 to N. ,…, This represents the set of layer-specific parameters for the attention output projection matrix in layers 1 through N. These represent the shared basis matrices for the input and output directions of the self-attention module, respectively, and are shared parameter matrices. The input and output of the attention output projection matrix share a basis matrix, which is a shared parameter matrix used to reuse the common feature transformation space across layers. These parameter matrices are related to the original parameter matrix. The relationship is as follows: the original parameter matrices of each layer can be obtained through the corresponding core tensor. With shared parameter matrix and layer-specific parameter matrices It is obtained by performing the Tucker pattern product, that is, by sequentially multiplying the three patterns. Multiplication can recover the parameter matrix corresponding to each layer, realizing the recombination mapping from the learning gene to the specific parameters of the layer.
[0071] The optimization objective is to minimize the prediction loss:
[0072]
[0073]
[0074] in, The parameter is The network model, Indicates loss, The predicted values of the basic network model; Input information to the basic network model.
[0075] The "backward fitting" of this method is reflected in the fact that it does not directly decompose the existing matrix, but gradually adjusts it through the training process. Pre-training is performed while ensuring shared constraints. This yields... It possesses cross-layer sharing and reusability, and Layer-specific differences were preserved.
[0076] (3) Determine the scale of the terminal network model based on the computing resources of the terminal performing the terminal task and the application scenario of the terminal task. Select several layers from the basic network model according to the scale to form the network structure of the terminal network model.
[0077] Step (3) specifically includes:
[0078] (3.1) Evaluate the computing resources of the end-side terminal, and obtain the upper limit of the video memory / memory , the upper limit of the single inference delay , the average energy consumption budget , thereby forming a resource constraint triple ; the processor type and parallelism can also be obtained; in combination with the corresponding token number N, the parameter storage budget and intermediate activation budget that can be carried out by the end-side network model in one forward propagation can be obtained;
[0079] (3.2) Determine the performance target according to the application scenario of the end-side task, and define the minimum performance standard of the end-side network model; for example, when the task is image generation, the generation resolution, generation speed and perceptual quality requirements can be set. The requirements are used to define the minimum performance standard of the end-side model.
[0080] (3.3) Select the size of the end-side network model that meets the resource constraint triple and the minimum performance standard; the size parameters of the end-side model (including the number of layers N d , the hidden dimension D d , the number of attention heads H d , the learning gene rank r d and the sampling step number d ) need to be determined under the dual conditions of resource constraints and task requirements. Specifically, first ensure that the model consumes no more than the upper limit of video memory / memory , the single inference delay does not exceed the upper limit , and the energy consumption does not exceed the upper limit . On this basis, ensure that the model performance meets the minimum standard required by the task. Under the condition of meeting the above conditions, the smallest size configuration that meets the constraints is preferably selected to reduce the overhead; when the terminal computing power is sufficient, the network depth or dimension can be appropriately increased to improve the performance.
[0081] (3.4) Extract a number of layers from the basic network model to form an end-side network model network structure with the size described in step (3.3).
[0082] Specifically, after determining the number of layers N d , N d layers Block can be randomly extracted from the basic network model, or the first N d layers Block can be extracted in sequence from the first layer. Then, according to the hidden dimension D d , the number of attention heads H d , the learning gene rank r d and the sampling step number dThe structure of each layer Block is set, and finally combined to form the end-side network model network structure. For example, on a smartphone, smartwatch, smart game console, D d =4, N d =6, while on a computer, cloud server, etc. with sufficient resources, D d =12, N d =12.
[0083] (4) The learning genes obtained by decomposing the basic network model are used to initialize the shared parameter matrix of the end-side network model, the layer-specific parameter matrix of the end-side network model is randomly initialized, and the core tensor is unit initialized and pre-trained.
[0084] As shown in Figure 4 , this step specifically includes:
[0085] (4.1) Map the learning genes obtained by decomposition to each corresponding layer of the end-side network model, and the parameters obtained by mapping all layers of the end-side network model form the shared parameter matrix of the end-side network model. ;
[0086] The learning genes contain knowledge patterns that are invariant across depth and scale, and can be transferred and used between different scale models. Since the number of layers of the end-side network model is changed relative to the basic network model, . In the subsequent training phase, the matrix is frozen and does not participate in subsequent training, thereby ensuring the consistency and stability of the cross-scale knowledge;
[0087] (4.2) According to the scale of the end-side network model, construct the layer-specific parameter matrix and core tensor of the end-side network model, and initialize the core tensor to a unit tensor and the layer-specific parameter matrix randomly.
[0088] Specifically, according to the scale (such as the number of layers N d , hidden dimension D d , number of attention heads H d ) of the end-side network model, construct the layer-specific parameter matrix and the core tensor . For the core tensor , it can be initialized to a unit tensor. For the layer-specific parameter matrix , directly initialize it with random values when the new model is constructed (such as He Normal or Uniform initialization). Thus, the model parameters of the end-side network model are:
[0089]
[0090] (4.3) Obtain the dataset of the partial base training model, and pre-train the initialized end-side network model. In the pre-training, only the layer-specific parameter matrix is trained or both the layer-specific parameter matrix and the core tensor are trained.
[0091] In the pre-training stage, only the parameters of the matrix or the parameters of the matrix and the core tensor are optimized. The parameters of the matrix or the parameters of the matrix and the core tensor are not involved in the update. The amount of data required for training is small, only a small amount of data needs to be sampled, and the number of training steps is also short. This process is called "lightweight training" because the parameter space is very compact and the optimization overhead is minimal.
[0092] (5) Fine-tune the pre-trained end-side network model using the end-side task dataset to obtain a lightweight end-side network model.
[0093] This step specifically includes:
[0094] (5.1) Obtain the end-side task dataset as:
[0095]
[0096] Wherein represents the i-th sample input in the end-side task dataset, represents the label. Perform normalization, enhancement or feature extraction operations on the end-side task dataset to ensure that the distribution is consistent with the pre-training stage.
[0097] (5.2) Train the pre-trained end-side network model using the end-side task dataset, and the training target is:
[0098]
[0099] Wherein is a task-related loss function, represents the prediction function of the end-side network model;
[0100] (5.3) After completing the training of the end-side network model, evaluate the performance of the end-side network model. If the performance reaches the preset threshold, the fine-tuning of the end-side network model is completed.
[0101] It can be understood that the model deployment of the present application can also be applied to other end-side task models, such as speech recognition tasks, image target detection tasks, speech segmentation tasks, etc.
[0102] Embodiment Two
[0103] The embodiments of the present application also provide a computer program product, such as an app on a mobile phone, a tablet, an installation program on a computer, and the like, which includes computer programs / instructions that are executed by a processor to implement the method of Embodiment One. The code for the computer executable programs to perform the operations of the present application can be written in one or more programming languages, or combinations thereof, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). The present application relates to a computer program product that includes a computer readable medium having stored computer programs / instructions.
[0104] Embodiment Three
[0105] The embodiments of the present application provide a computer device, and the embodiments of the present application provide services for the implementation of the method of Embodiment One described above. The device can include a memory storing computer executable programs, a processor coupled to the memory, and the processor calling the computer executable programs stored in the memory to execute the steps in the method described in Embodiment One.
[0106] The memory can include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage media can be used for reading and writing non-removable, non-volatile magnetic media (e.g., a "hard drive"), into which a set or multiple set of program modules can be loaded onto, such as the operating system, one or more application programs, other program modules, and program data. Each of these example programs can include an implementation of a networking environment, or a combination of some or all of these example programs. The computer executable programs of the program modules typically perform the functions and / or methods described in the embodiments of the present application.
[0107] The processor performs various function applications and data processing by running the programs stored in the memory, such as implementing the method provided in Embodiment One of the present application.
[0108] The code of a computer program can be written in one or more programming languages, or combinations thereof, including an object oriented programming language such as Java, Smalltalk, C++, or a conventional procedural programming language such as the "C" programming language or similar programming languages.
[0109] Embodiment four
[0110] The embodiment of the present application provides a lightweight end-side model deployment method for learning genes based on parameter decomposition and reorganization, specifically deploying the end-side network model calculated by the method of embodiment one to a corresponding end-side terminal.
[0111] It should be understood that the above embodiments and descriptions in the specification are only the principles, main features and advantages of the present application, and various changes and improvements can be made without departing from the spirit and scope of the present application, and these changes and improvements all fall within the protection scope of the present application.
Claims
1. A lightweight end-to-side model calculation method for learning genes based on parameter decomposition reorganization, characterized by, The method comprises the following steps: (1) selecting a Diffusion Transformer as a base network model of an end-side task, the end-side task being an image generation task; (2) pre-training the base network model, and factorizing a parameter matrix of the base network model into a shared parameter matrix, a layer-specific parameter matrix and a core tensor during the pre-training process, and taking the shared parameter matrix as a learning gene; wherein the shared parameter matrix is a parameter matrix irrelevant to network size and shared across layers in the base network model, the layer-specific parameter matrix is a parameter matrix recording difference information of each layer, and the core tensor is a parameter matrix capturing interaction relationship and weight between layers; (3) determining a size of an end-side network model according to computing resources of an end-side terminal executing the end-side task and an application scenario of the end-side task, selecting a plurality of layers from the base network model according to the size to form a network structure of the end-side network model; (4) initializing the shared parameter matrix of the end-side network model with the learning gene obtained by decomposing the base network model, randomly initializing the layer-specific parameter matrix of the end-side network model, and unit initializing the core tensor, and pre-training the end-side network model; (5) fine-tuning the pre-trained end-side network model with an end-side task dataset to obtain a lightweight end-side network model.
2. The parameter decomposition reorganization learning gene-based lightweight end-side model calculation method according to claim 1, characterized by, The step (2) specifically comprises: (2.1) setting a relationship expression of the parameter matrix of the selected base network model and the shared parameter matrix, the layer-specific parameter matrix and the core tensor; , wherein, is a parameter matrix of a base network model, is a core tensor, is a shared parameter matrix, is a layer-specific parameter matrix, denotes that the decomposition is obtained by training constrained backfitting, , , denote the mode product of the tensor and the matrix on the 1st, 2nd, and 3rd mode, respectively, r denotes the rank of the core tensor, m1 denotes the size of the input feature dimension, m2 denotes the size of the output feature dimension, and N denotes the number of model layers. (2.2) obtaining values of the shared parameter matrix, the layer-specific parameter matrix and the core tensor by using training constraint reverse fitting with the minimum prediction loss as an optimization objective.
3. The parameter decomposition reorganization learning gene-based lightweight end-side model calculation method according to claim 2, characterized by, The optimization objective is: , , wherein, represents a network model with parameters , represents a loss, is a base network model prediction target; is a base network model input information.
4. The parameter decomposition reorganization learning gene-based lightweight end-side model calculation method according to claim 1, characterized by, The step (3) specifically comprises: (3.1) evaluating the computing resources of the peer-side terminal to obtain an upper limit of the video memory / memory , a single-inference delay upper limit , an average energy consumption budget , thereby forming a resource-constrained triple ; (3.2) determining a performance target according to the application scenario of the end-side task, and defining a minimum performance standard of the end-side network model; (3.3) selecting a size of the edge network model that satisfies the resource constraint triplets and the minimum performance criteria; (3.4) extracting a plurality of layers from the base network model to form the network structure of the end-side network model with the size in the step (3.3).
5. The parameter decomposition reorganization learning gene-based lightweight end-side model calculation method according to claim 1, characterized by, The step (4) specifically comprises: (4.1) mapping the learning gene obtained by decomposing to each corresponding layer of the end-side network model, and forming the shared parameter matrix of the end-side network model with parameters obtained by mapping all layers of the end-side network model; (4.2) constructing the layer-specific parameter matrix and the core tensor of the end-side network model according to the size of the end-side network model, and initializing the core tensor as a unit tensor and the layer-specific parameter matrix randomly; (4.3) obtaining a dataset of a part of a base training model, and pre-training the initialized end-side network model, wherein only the layer-specific parameter matrix or both the layer-specific parameter matrix and the core tensor are trained during the pre-training.
6. The parameter decomposition reorganization learning gene-based lightweight end-side model calculation method according to claim 1, characterized by, The step (5) specifically comprises: (5.1) obtaining an end-side task dataset; (5.2) training the pre-trained end-side network model with the end-side task dataset with the minimum loss as an objective; (5.3) evaluating performance of the end-side network model after completing the training of the end-side network model, and completing fine-tuning of the end-side network model when the performance reaches a preset threshold.
7. The parameter decomposition reorganization learning gene-based lightweight end-side model calculation method according to claim 1, characterized by, The base network model is a Transformer or a variant thereof.
8. A computer program product comprising a computer program, characterized in that: The computer program, which is executed by a processor, implements the method of any one of claims 1-7.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that: The processor executes the computer program to implement the method of any one of claims 1-7.
10. A lightweight end-side model deployment method for learning a gene based on parameter decomposition reorganization, characterized by, The end-side network model calculated by the method of claim 1 is deployed on a corresponding end-side terminal.