Model training method, model deployment method, device, electronic device, and storage medium
The method trains deep learning models using nested Transformer architecture to create scalable submodels, addressing resource constraints and training inefficiencies, enhancing deployment flexibility and efficiency.
Patent Information
- Application Number
- JP2025234692
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-29
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-04
AI Technical Summary
Large-scale deep learning models require significant computational and memory resources, making them difficult to deploy in scenarios with limited hardware resources, and existing methods of training multiple models separately increase training costs and may not fully utilize the model's training capacity.
A model training method that identifies and trains modules based on preset scale information, using nested Transformer architecture to create smaller submodels from a single model, allowing flexible training and reducing computational overhead.
This method enables efficient deployment of models with reduced resource requirements, improving training efficiency and adaptability to different hardware scenarios while fully utilizing model parameters.
Smart Images

Figure 2026035859000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to the field of artificial intelligence, particularly to the field of large-scale models and deep learning. More specifically, the present disclosure provides a model training method, a model deployment method, an apparatus, an electronic device, and a storage medium. [Background technology]
[0002] With the development of artificial intelligence technology, the size of deep learning models is increasing. As the model size increases, the performance of deep learning models also improves. To balance model inference capabilities and hardware resource overhead, the model size can be adjusted when deploying a deep learning model to an application scenario. Summary of the Invention [Means for solving the problem]
[0003] The present disclosure provides a model training method, a model deployment method, an apparatus, a device, and a storage medium.
[0004] According to one aspect of the present disclosure, there is provided a model training method, including: identifying at least one module size information based on preset model size information; identifying at least one trained module based on the at least one module size information and a plurality of initial modules of an initial model, the at least one trained module including trained parameters identified from the initial module based on the module size information; and training the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module.
[0005] According to another aspect of the present disclosure, there is provided a model deployment method including: identifying a deployable model from a target model based on predetermined model size information; and deploying the deployable model to a hardware device for the deployable model, wherein the target model is obtained by training the initial model through the following operations: identifying at least one module size information based on the predetermined model size information; identifying at least one trained module, the at least one trained module including trained parameters identified from the initial module based on the module size information, based on the at least one module size information and a plurality of initial modules of the initial model; and training the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module.
[0006] According to another aspect of the present disclosure, there is provided a model training apparatus including: a first identification module that identifies at least one module scale information based on preset model scale information; a second identification module that identifies at least one trained module based on the at least one module scale information and a plurality of initial modules of an initial model, the at least one trained module including trained parameters identified from the initial modules based on the module scale information; and a training module that trains the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module.
[0007] According to another aspect of the present disclosure, there is provided a module deployment device including: a third identification module that identifies a deployment-target model from a target model based on predetermined model size information; and a deployment module that deploys the deployment-target model to a hardware device for the deployment-target model, wherein the target model is obtained by training an initial model by performing related operations by: a first identification module that identifies at least one module size information based on the predetermined model size information; a second identification module that identifies, based on the at least one module size information and a plurality of initial modules of the initial model, at least one trained module including trained parameters identified from the initial module based on the module size information; and a training module that trains the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module.
[0008] According to another aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor performs a method provided by the present disclosure.
[0009] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to perform a method provided by the present disclosure.
[0010] According to another aspect of the present disclosure, there is provided a computer program product which, when executed by a processor, implements the methods provided by the present disclosure.
[0011] It is to be understood that the contents described in this section are not intended to illustrate key points or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood from the following description.
[0012] BRIEF DESCRIPTION OF THE DRAWINGS The drawings are for a better understanding of the invention and are not intended to limit the disclosure. [Brief explanation of the drawings]
[0013] [Figure 1] FIG. 1 is a flowchart of a model training method according to one embodiment of the present disclosure. [Figure 2A] FIG. 2A is a schematic diagram of an initial model according to one embodiment of the present disclosure. [Figure 2B] FIG. 2B is a schematic diagram of identifying a model to be trained according to one embodiment of the present disclosure. [Figure 3A] FIG. 3A is a schematic diagram of multiple initial attention data blocks according to one embodiment of the present disclosure. [Figure 3B] FIG. 3B is a schematic diagram of an intermediate query parameter matrix according to one embodiment of the present disclosure. [Figure 4] FIG. 4 is a schematic diagram of an initial feedforward parameter matrix according to one embodiment of the present disclosure. [Figure 5] FIG. 5 is a flowchart of a model deployment method according to another embodiment of the present disclosure. [Figure 6] FIG. 6 is a block diagram of a model training apparatus according to one embodiment of the present disclosure. [Figure 7] FIG. 7 is a block diagram of a model deployment device according to one embodiment of the present disclosure. [Figure 8] FIG. 8 is a block diagram of an electronic device to which at least one of a model training method and a model deployment method according to an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE INVENTION
[0014] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. Hereinafter, various details of the embodiments of the present disclosure are included for ease of understanding, and should be considered as examples. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, the following description will omit descriptions of well-known functions and configurations.
[0015] A large-scale deep learning model may be referred to as a large-scale model. A large-scale model may be, for example, a large-scale language model (LLM). A large-scale model with a huge scale requires very high computational and memory resources for inference and training, and has a large inference delay, making it difficult to deploy in application scenarios with limited hardware resources. This allows models of different scales to be deployed for different application scenarios to balance inference speed and accuracy.
[0016] To obtain models of different scales, multiple models of different scales can be trained separately to meet the needs of various application scenarios. However, this method of training each model separately increases the cost of model training. If large-scale pre-training is required for the model, the overhead of computational resources will be large.
[0017] Large-scale models can be constructed based on the Transformer architecture. To reduce computational overhead, a nested Transformer (Matryoshka Transformer, MatFormer) architecture can be used to obtain multiple smaller submodels from a single trained model. The nested Transformer architecture employs a structured nesting design for the multi-head self-attention (MHA) layer and feed-forward network (FFN) layer of the Transformer architecture, with smaller submodels included in the larger submodel. Based on the nested Transformer architecture, one submodel can be randomly selected and trained during training. The parameters of the submodels based on the nested Transformer architecture can be predetermined. For example, for multiple attention heads in a multi-head self-attention layer, the parameters of the first to third attention heads can be used as the parameters of the first submodel, and the parameters of the fourth to sixth attention heads can be used as the parameters of the second submodel based on the nested Transformer architecture. When training the first submodel, we adjust the parameters of the first to third attention heads.
[0018] The nested Transformer architecture can achieve flexible training that is effective to a certain extent. However, the parameters of the sub-models based on the nested Transformer architecture are predetermined, and some parameters may not be trained sufficiently, which may result in the training capacity of the large-scale model not being fully utilized and may affect the final performance of the large-scale model. In addition, the nested Transformer architecture may perform calculations based on multiple sub-models during the forward calculation process, which increases the training cost.
[0019] Therefore, in order to efficiently deploy the model in application scenarios, the present disclosure provides a model training method, which is described below.
[0020] FIG. 1 is a flowchart of a model training method according to one embodiment of the present disclosure. As shown in FIG. 1, the method 100 may include operations S110 to S130.
[0021] In operation S110, at least one module scale information is identified based on the preset model scale information.
[0022] In an embodiment of the present disclosure, the preset model size information may indicate a scale for identifying a trained model from an initial model. For example, the preset model size information may indicate that the number of parameters of the trained model is 25% of the number of parameters of the initial model. Also, for example, the preset model size information may indicate that the number of parameters of the trained model is 50% of the number of parameters of the initial model.
[0023] In the embodiments of the present disclosure, the initial model may be a large-scale model. The initial model may include multiple initial modules. The initial model may be referred to as a full model. For example, the initial model may be the large-scale model. One transformer block of the large-scale model may be one initial module. Note that an embedding module of the large-scale model may be one initial module.
[0024] In an embodiment of the present disclosure, the module size information may indicate the size of parameters to be trained in an initial module. For example, if the preset model size information indicates that the number of parameters of the trained model is 25% of the number of parameters of the initial model, the module size information may indicate that the number of parameters to be trained in one initial module is 25% of the number of parameters of the initial module.
[0025] In operation S120, at least one module to be trained is identified based on the at least one module size information and the plurality of initial modules of the initial model.
[0026] In an embodiment of the present disclosure, the trained module includes training target parameters identified from the initial module based on module size information. For example, if the module size information indicates that the number of training target parameters in the initial module is 25% of the number of parameters of the initial module, multiple initial parameters can be randomly identified as training target parameters from all the initial parameters of the initial module. The number of training target parameters is 25% of the number of parameters of all the initial parameters.
[0027] In an embodiment of the present disclosure, the number of trained modules may be equal to or less than the number of initial modules. At least one trained module may be a trained model. The trained model may be a sub-model of the initial model or the entire initial model.
[0028] In operation S130, at least one trained module is trained based on the training sample data to obtain at least one trained module.
[0029] In an embodiment of the present disclosure, the training sample data is obtained from at least one of text sample data, image sample data, audio sample data, and video sample data. For example, the training sample data may be single-modal sample data or multi-modal sample data. If the training sample data is single-modal sample data, one of text sample data, image sample data, and audio sample data may be the training sample data. Also, for example, video includes data of multiple modalities such as image and audio. If the training sample data is multi-modal sample data, video sample data may be the training sample data.
[0030] In an embodiment of the present disclosure, training sample data is input to at least one trained module to obtain sample results. Loss information can be determined based on the sample results and labels of the training sample data. At least one trained module can be adjusted based on the loss information to obtain at least one trained module.
[0031] According to an embodiment of the present disclosure, module size information is determined based on preset model size information, and a training target module is further determined based on the module size information and an initial module. Thus, even if the preset model size information is the same across multiple training rounds, the module size information may be different, and the parameters included in the multiple training target modules determined based on the same initial module may also be different. In different training rounds, at least one training target model corresponding to the preset model size information is not fixed but dynamically determined, and all parameters of the full model can be used as training target parameters, allowing the model parameters to be fully trained and helping to improve model performance.
[0032] In addition, according to the embodiments of the present disclosure, the trained module is obtained based on an initial module of an initial model. Therefore, the storage unit only needs to store parameters of the initial model, eliminating the need to store parameters for each of the multiple submodels, thereby effectively reducing storage resource overhead. During the training process, forward calculations performed by at least one trained module identified based on pre-defined model size information are equivalent to forward calculations performed based on a single trained model, avoiding simultaneous forward calculations by multiple submodels. This reduces the computational resource overhead of a training round and lowers the hardware requirements for model training.
[0033] For ease of understanding, having described the method of the present disclosure, the preset model scale information of the present disclosure will now be described.
[0034] In some embodiments, the preset model size information includes a plurality of preset model size parameters. The number of preset parameters indicated by the preset model size parameters is less than or equal to the number of initial parameters of the initial model. For example, the plurality of preset model size parameters may include a first preset model size parameter, a second preset model size parameter, a third preset model size parameter, and a fourth preset model size parameter. The first preset model size parameter may be 25%, indicating that the number of parameters of the trained model is 25% of the initial model. The second preset model size parameter may be 50%, indicating that the number of parameters of the trained model is 50% of the initial model. The third preset model size parameter may be 75%, indicating that the number of parameters of the trained model is 75% of the initial model. The fourth preset model size parameter may be 100%, indicating that the initial model is the trained model.
[0035] For purposes of understanding, the preset model scale information of the present disclosure has been described above, and several ways of specifying the module scale information of the present disclosure will now be described.
[0036] In some examples, in some embodiments of operation S110, determining at least one module size information based on the preset model size information includes determining a target model size parameter from a plurality of preset model size parameters based on a plurality of preset parameter probability values used for the plurality of preset model size parameters. The number of preset parameters indicated by the target model size parameter corresponds to the number of trained parameters used for at least one trained module. For example, a first preset parameter probability value used for the first preset model size parameter may be 16.6%, indicating a 16.6% probability that 25% of the number of initial model parameters are parameters of the trained model. A second preset parameter probability value used for the second preset model size parameter may be 16.6%, indicating a 16.6% probability that 50% of the number of initial model parameters are parameters of the trained model. A third preset parameter probability value used for the third preset model size parameter may be 16.8%, indicating a 16.8% probability that 75% of the number of initial model parameters are parameters of the trained model. The fourth preset parameter probability value used for the fourth preset model size parameter may be 50%, indicating that the probability of using the initial model as the trained model is 50%. For example, taking the second preset model size parameter as the target model size parameter, the number of parameters of the trained model identified from the initial model may be 50% of the number of parameters of the initial model.
[0037] In some embodiments, the number of trained modules is equal to or less than the number of initial modules. This reduces the number of transformer blocks and enables lightweight deployment. For example, if the target scale parameter is 50%, the number of initial modules is N, and N is an even number greater than 1, then N / 2 initial modules can be trained modules. Alternatively, if the target scale parameter is 50%, the number of initial modules can be N trained modules, and then the scale of each trained module can be determined. As can be seen, the number of trained modules can be determined randomly based on the target module scale parameter. As can be seen, according to embodiments of the present disclosure, models with different depths (different numbers of transformer blocks) can be effectively trained, improving training efficiency. Trained models with different depths can adapt to the deployment needs of different hardware resources, which also helps improve model deployment efficiency.
[0038] In some embodiments, in some embodiments of the above operation S110, determining at least one module size information based on the preset model size information further includes determining at least one module size information to be used for at least one initial module based on a target model size parameter. For example, any module size information may match the target model size information. For example, if the target model size parameter is 50%, the module size information may indicate that the number of parameters of the module to be trained is 50% of the number of parameters of the corresponding initial module. Also, for example, if there are multiple module size information, different module size information may be different. The multiple module size information may include first module size information and second module size information. The first module size information may be 40%, indicating that the number of parameters of the module to be trained is 40% of the number of parameters of the corresponding initial module. The second module size information may be 60%, indicating that the number of parameters of the module to be trained is 60% of the number of parameters of the corresponding initial module.
[0039] In some embodiments, identifying at least one module size information to be used for the at least one initial module based on the target model size parameter includes identifying latent variable size information and at least one module size information to be used for the at least one initial module based on the target model size parameter. The latent variable size information may indicate the size of a latent variable to be used for the module to be trained. For example, if the target model size parameter indicates that the number of parameters of the model to be trained is 50% of the number of parameters of the corresponding initial model, the latent variable size information may indicate that the number of parameters of a latent variable to be used for the model to be trained is 50% of the number of parameters of the latent variable to be used for the corresponding initial model.
[0040] To facilitate understanding, the above describes the manner in which module size information of the present disclosure is determined. Below, several manners for determining the model to be trained are described.
[0041] In some examples, in some embodiments of operation S120, identifying at least one trained module based on at least one module size information and a plurality of initial modules of the initial model includes identifying a plurality of trained parameters included in the trained module from the initial module based on module size information used for the initial module and at least one of a plurality of sampling modes. The plurality of sampling modes includes a random sampling mode. For example, assuming that the first module size information is 40% and the first module size information is used for the first initial module, 40% of the parameters may be randomly sampled from the plurality of initial parameters of the first initial module to be used as the trained parameters. In one example, if the number of parameters of the first initial module is 100 megabytes (MB), 40 megabytes of parameters may be randomly sampled to be used as the trained parameters. This will be further described below with reference to FIGS. 2A and 2B.
[0042] FIG. 2A is a schematic diagram of an initial model according to one embodiment of the present disclosure. As shown in Figure 2A, the initial model m20 may include multiple initial modules, including an initial embedding module emb201, an initial processing module tb201, an initial processing module tb202, ..., an initial processing module tb203. The initial processing modules may be the transformer blocks.
[0043] FIG. 2B is a schematic diagram of identifying a model to be trained according to one embodiment of the present disclosure. As shown in Figure 2B, a model to be trained can be identified from the initial model m20 based on the target size sampling parameter. Next, take the target model size parameter as 50% as an example.
[0044] As shown in FIG. 2B, the initial embedding data of the initial embedding module emb201 may include multiple initial embedding parameter blocks. Each initial embedding parameter block may include multiple initial embedding parameters. Among the multiple initial embedding parameter blocks, the initial embedding parameter block emb2011 and the initial embedding parameter block emb2012 may be two training target embedding parameter blocks. The sum of the number of parameters of the initial embedding parameter block emb2011 and the initial embedding parameter block emb2012 may be 50% of the number of parameters of the initial embedding module emb201.
[0045] As shown in FIG. 2B , the initial processing data of the initial processing module tb201 includes a plurality of initial processing parameter blocks. The initial processing parameter blocks may include a plurality of initial processing parameters. Among the plurality of initial processing parameter blocks, the initial processing parameter block tb2011 and the initial processing parameter block tb2012 may be two training target processing parameter blocks. The sum of the number of parameters in the initial processing parameter block tb2011 and the number of parameters in the initial processing parameter block tb2012 may be 40% of the number of parameters in the initial processing module tb201. As can be understood, the initial processing module tb201 may be the first initial module, and the module size information used for the initial processing module tb201 may be the first module size information.
[0046] As shown in FIG. 2B, the initial processing data of the initial processing module tb202 includes multiple initial processing parameter blocks. The multiple initial processing parameter blocks may include an initial processing parameter block tb2021. The initial processing parameter block tb2021 may be a single training target processing parameter block. The number of parameters in the initial processing parameter block tb2021 may be 50% of the number of parameters in the initial processing module tb202.
[0047] 2B , the initial processing data of the initial processing module tb203 includes a plurality of initial processing parameter blocks. The plurality of initial processing parameter blocks may include an initial processing parameter block tb2031. The initial processing parameter block tb2031 may be one training target processing parameter block. The number of parameters in the initial processing parameter block tb2031 may be 60% of the number of parameters in the initial processing module tb203. As can be understood, the initial processing module tb203 may be the second initial module, and the module size information used for the initial processing module tb203 may be the second module size information.
[0048] As can be appreciated, several ways of identifying modules to be trained have been described above, and several more ways of identifying modules to be trained will now be described.
[0049] In some embodiments, the initial module includes at least one of an initial attention layer and an initial feedforward layer. The trained module includes at least one of a trained attention layer and a trained feedforward layer. For example, the initial modules may include the initial embedding module and the initial processing module. The initial processing module includes at least one of an initial attention layer and an initial feedforward layer. The initial parameters may include a plurality of initial processing parameters. The initial processing parameters may include an initial attention parameter and an initial feedforward parameter. The trained parameters may include a plurality of trained processing parameters. The trained processing parameters may include a trained attention parameter and a trained feedforward parameter. For example, the initial module may include the initial processing module. The initial attention layer may be the multi-head self-attention layer. The initial feedforward layer may be the feedforward network layer. The trained attention layer may be obtained based on the initial attention layer. The trained feedforward layer may be obtained based on the initial feedforward layer.
[0050] In some embodiments, the training target parameters of the training target module can be determined from at least one of the initial attention layer and the initial feedforward layer. As can be understood, the attention scale information used for the initial attention layer and the feedforward scale information used for the initial feedforward layer can be determined based on the module scale information used for the initial processing module. The sum of the number of parameters of the training target feedforward parameters indicated by the feedforward scale information and the number of parameters of the training target attention parameters indicated by the attention scale information may be the number of parameters of the initial processing parameters indicated by the module scale information. The following description will be made with reference to the initial attention layer.
[0051] In some embodiments, identifying at least one training target module based on at least one module-size information and a plurality of initial modules of the initial model includes identifying training target attention data of a training target attention layer from the initial attention layer based on the module-size information used for the initial module, where the training target attention data includes a plurality of training target attention parameters.
[0052] In some embodiments, the initial attention layer includes initial attention data for each of a plurality of initial attention heads, and the initial attention data includes an initial query parameter matrix, an initial key parameter matrix, and an initial value parameter matrix. Identifying the training target attention data of the training target attention layer from the initial attention layer includes identifying at least one initial attention data of at least one initial attention head as at least one intermediate attention data of at least one training target attention head. Identifying at least one training target attention data from the at least one intermediate attention data. This will be further described below with reference to FIG. 3A.
[0053] FIG. 3A is a schematic diagram of multiple initial attention data blocks according to one embodiment of the present disclosure.
[0054] As shown in FIG. 3A , the initial attention layer includes multiple initial attention data blocks. The multiple initial attention data blocks include an initial attention data block tba3001, an initial attention data block tba3002, and an initial attention data block tba3003. The initial attention layer of the initial processing module may include 16 initial attention heads. The module size information used in the initial processing module may be 50%, and eight initial attention heads may be randomly selected as training target attention heads. The initial attention data block tba3001, the initial attention data block tba3002, and the initial attention data block tba3003 include initial attention data for four initial attention heads, initial attention data for two initial attention heads, and initial attention data for two initial attention heads, respectively. The initial attention data for each of the eight initial attention heads can be eight intermediate attention data. In one example, the eight intermediate attention data can be eight training target attention data.
[0055] According to an embodiment of the present disclosure, any one or more attention heads from multiple attention heads can be identified as the attention heads to be trained, thereby improving the flexibility of training and effectively improving training efficiency.
[0056] For ease of understanding, the above description refers to the intermediate attention data as the training target attention data, but the present disclosure is not limited thereto, and a part of the intermediate attention data may also be used as the training target attention data, as will be further described below.
[0057] In some embodiments, the intermediate attention data may include an intermediate query parameter matrix, an intermediate key parameter matrix, and an intermediate value parameter matrix. The training subject attention data includes a training subject query parameter matrix, a training subject key parameter matrix, and a training subject value parameter matrix.
[0058] In some embodiments, identifying at least one training target attention data from the at least one intermediate attention data may include at least one of: identifying at least one intermediate query parameter submatrix of the intermediate query parameter matrix as at least one training target query parameter submatrix of the training target query parameter matrix; identifying at least one intermediate key parameter submatrix of the intermediate key parameter matrix as at least one training target key parameter submatrix of the training target key parameter matrix; and identifying at least one intermediate value parameter submatrix of the intermediate value parameter matrix as at least one training target value parameter submatrix of the training target value parameter matrix. For example, taking the query parameter matrix as an example, the initial query parameter matrix may be the intermediate query parameter matrix. Some or all of the intermediate query parameter matrix may be the training target query parameter matrix. This will be further described below with reference to FIG. 3B.
[0059] FIG. 3B is a schematic diagram of an intermediate query parameter matrix according to one embodiment of the present disclosure. As shown in FIG. 3B , the intermediate query parameter matrix tbaq30 may include multiple intermediate query parameters. Three training target query parameter submatrices tbaq301, tbaq302, and tbaq303 may be randomly selected from the intermediate query parameter matrix tbaq30. In one example, matrix elements of the intermediate query parameter matrix tbaq30 other than the intermediate query parameter submatrices tbaq301, tbaq302, and tbaq303 may be set to a predetermined value (0) to obtain a training target query parameter matrix. It should be understood that the methods for obtaining the training target key parameter matrix and the training target value parameter matrix are the same as or similar to the methods for obtaining the training target parameter matrix based on the intermediate query parameter matrix tbaq30, and therefore will not be described further in this disclosure. According to an embodiment of the present disclosure, any portion of the attention parameters can be used as the training target attention parameters, thereby effectively improving training efficiency.
[0060] As can be seen, based on the attention scale information, at least one initial attention data of at least one initial attention head is randomly identified as at least one intermediate attention data of at least one training target attention head.
[0061] As will be appreciated, having described above several ways of identifying attention parameters to train, we now describe several ways of identifying feedforward parameters to train.
[0062] In some embodiments, the feedforward data to be trained for the feedforward layer to be trained can be identified from the initial feedforward layer based on module size information used for the initial module.
[0063] In some embodiments, the initial feedforward parameter matrix of the initial feedforward layer includes a plurality of initial feedforward parameters, and the training target feedforward data includes at least one training target feedforward parameter sub-matrix. Identifying the training target feedforward data of the training target feedforward layer from the initial feedforward layer includes identifying at least one initial feedforward parameter sub-matrix of the initial feedforward parameter matrix as the at least one training target feedforward parameter sub-matrix. This will be described below with reference to FIG. 4.
[0064] FIG. 4 is a schematic diagram of an initial feedforward parameter matrix according to one embodiment of the present disclosure.
[0065] As shown in FIG. 4 , the initial feedforward parameter matrix tbffn40 may include multiple initial feedforward parameters. An initial feedforward parameter submatrix tbffn401, an initial feedforward parameter submatrix tbffn402, and an initial feedforward parameter submatrix tbffn403 may be randomly identified from the initial feedforward parameter matrix tbffn40 to be used as three training target feedforward parameter submatrices. In one example, matrix elements of the initial feedforward parameter matrix tbffn40 other than the initial feedforward parameter submatrix tbffn401, the initial feedforward parameter submatrix tbffn402, and the initial feedforward parameter submatrix tbffn403 may be set to a predetermined value (0) to obtain a training target feedforward parameter matrix. The total number of parameters in the multiple training target feedforward parameter submatrices may match the number of parameters indicated by the feedforward magnitude information used in the initial feedforward layer.
[0066] For the sake of understanding, the present disclosure has been described above with reference to an initial attention layer and an initial feedforward layer of the initial processing module, although the present disclosure is not limited thereto and the initial processing module may further include multiple initial expert units.
[0067] In some embodiments, identifying at least one module to be trained based on at least one module size information and multiple initial modules of the initial model includes identifying at least one initial expert unit among the multiple initial expert units as at least one expert unit to be trained of the module to be trained based on the module size information used for the initial module. The expert unit may be a mixture of experts (MoE). For example, taking the first module size information as an example, if there are 16 initial expert units, four initial expert units may be randomly selected as the expert units to be trained. According to embodiments of the present disclosure, the number of expert units can be adjusted, allowing the model to be more efficiently deployed to multiple application scenarios with different hardware resources.
[0068] According to the embodiments of the present disclosure, it is possible to train attention layers, feedforward layers, latent variables, expert units, and processing modules of different scales, thereby realizing all-round flexible training and providing more flexible strategies for model training.
[0069] To allow for understanding, several ways of identifying a model to be trained have been described above, and several ways of training the model to be trained will now be described.
[0070] In some embodiments, in some embodiments of operation S130, the text sample data may be tokenized to obtain the text sample tokenized data. The text sample tokenized data may be input to at least one training subject module, and the at least one training subject module may be used to process the text sample tokenized data to obtain the text sample result. The at least one training subject module may be trained based on the text sample result and the label of the text sample data. In one example, the text sample data may be question text sample data. The text sample result may be an answer text sample result. The label of the text sample data may be actual manually assigned answer text used in the question text sample data.
[0071] The method of the present disclosure has been described above in conjunction with text sample data. However, the present disclosure is not limited thereto, and the trained module may be trained based on one or more of text sample data, image sample data, audio sample data, and video sample data. For example, taking image sample data as an example, the initial embedding module may perform patch embedding processing on the image sample data for subsequent module processing. The image sample data is input to at least one trained module, and the at least one trained module processes the image sample data to obtain image sample results. At least one trained module may be trained based on the image sample results and the labels of the image sample results. The image sample data may be, for example, a photograph taken. The image sample result may be, for example, an animated image. The label of the image sample result may be, for example, an animated image corresponding to the artificially drawn image sample data. Alternatively, for example, audio sample data may be converted into text, and then at least one trained module may be trained by referring to the training method of the at least one trained module using text sample data.
[0072] For clarity, the model training method of the present disclosure has been described above, and the model deployment method of the present disclosure will now be described.
[0073] FIG. 5 is a flowchart of a model deployment method according to another embodiment of the present disclosure. As shown in FIG. 5, the method 500 may include operations S510 through S520.
[0074] In operation S510, a deployment target model is identified from the target model based on preset model scale information.
[0075] As can be understood, the above description regarding the preset model scale information applies to this embodiment as well, and the present disclosure will not be repeated here.
[0076] In operation S520, the deployed model is deployed to a hardware device for the deployed model.
[0077] In an embodiment of the present disclosure, the target model is obtained by training an initial model by determining at least one module size information based on preset model size information, and determining at least one trained module based on the at least one module size information and a plurality of initial modules of the initial model. The trained module includes training parameters determined from the initial module based on the module size information, and the at least one trained module is trained based on training sample data to obtain at least one trained module. The training sample data is obtained from at least one of text sample data, image sample data, audio sample data, and video sample data. For example, the target model is obtained by training the initial model using the above method 100.
[0078] In some embodiments, the preset model size information includes a plurality of preset model size parameters, a number of preset parameters indicated by the preset model size parameters being less than or equal to a number of initial parameters of the initial model, and identifying the at least one module size information based on the preset model size information includes identifying a target model size parameter from the plurality of preset model size parameters based on a plurality of preset parameter probability values used for the plurality of preset model size parameters. The number of preset parameters indicated by the target model size parameter corresponds to a number of training target parameters used for the at least one training target module. The at least one module size information to be used for the at least one initial module is identified based on the target model size parameter.
[0079] In some embodiments, identifying at least one module size information to be used for the at least one initial module based on the target model size parameter includes identifying latent variable size information and at least one module size information to be used for the at least one initial module based on the target model size parameter, wherein the latent variable size information is used to indicate the size of a latent variable to be used for the module to be trained.
[0080] In some embodiments, identifying the at least one trained module based on the at least one module size information and the plurality of initial modules of the initial model includes identifying a plurality of trained parameters to be included in the trained module from the initial module based on at least one of a plurality of sampling modes based on the module size information used for the initial module, where the plurality of sampling modes includes a random sampling mode.
[0081] In some embodiments, the initial module includes at least one of an initial attention layer and an initial feedforward layer, and the trained module includes at least one of a trained attention layer and a trained feedforward layer. Identifying the at least one module to be trained based on the at least one module-size information and the initial modules of the initial model includes at least one of: identifying training-target attention data of the training-target attention layer including a plurality of training-target attention parameters from the initial attention layer based on the module-size information used for the initial module; and identifying training-target feedforward data of the training-target feedforward layer including a plurality of training-target feedforward parameters from the initial feedforward layer based on the module-size information used for the initial module.
[0082] In some embodiments, the initial attention layer includes initial attention data for each of a plurality of initial attention heads, and the initial attention data includes an initial query parameter matrix, an initial key parameter matrix, and an initial value parameter matrix. Identifying training target attention data for the training target attention layer from the initial attention layer includes identifying at least one initial attention data for the at least one initial attention head as at least one intermediate attention data for the at least one training target attention head. Identifying at least one training target attention data from the at least one intermediate attention data.
[0083] In some embodiments, the intermediate attention data includes an intermediate query parameter matrix, an intermediate key parameter matrix, and an intermediate value parameter matrix, and the training target attention data includes a training target query parameter matrix, a training target key parameter matrix, and a training target value parameter matrix. Identifying the at least one training target attention data from the at least one intermediate attention data includes at least one of identifying at least one intermediate query parameter sub-matrix of the intermediate query parameter matrix as at least one training target query parameter sub-matrix of the training target query parameter matrix, identifying at least one intermediate key parameter sub-matrix of the intermediate key parameter matrix as at least one training target key parameter sub-matrix of the training target key parameter matrix, and identifying at least one intermediate value parameter sub-matrix of the intermediate value parameter matrix as at least one training target value parameter sub-matrix of the training target value parameter matrix.
[0084] In some embodiments, the initial feedforward parameter matrix of the initial feedforward layer includes a plurality of initial feedforward parameters, and the training target feedforward data includes at least one training target feedforward parameter sub-matrix, and identifying the training target feedforward data of the training target feedforward layer from the initial feedforward layer includes identifying at least one initial feedforward parameter sub-matrix of the initial feedforward parameter matrix as the at least one training target feedforward parameter sub-matrix.
[0085] In some embodiments, the initial module includes a plurality of initial expert units, and identifying the at least one module to be trained based on the at least one module size information and the plurality of initial modules of the initial model includes identifying at least one initial expert unit of the plurality of initial expert units as the at least one expert unit to be trained of the module to be trained based on the module size information used for the initial module.
[0086] To enable understanding, having described the method of the present disclosure, we now turn to a description of the apparatus of the present disclosure.
[0087] FIG. 6 is a block diagram of a model training apparatus according to one embodiment of the present disclosure. As shown in FIG. 6, the apparatus 600 may include a first identification module 610, a second identification module 620, and a training module 630.
[0088] The first identification module 610 identifies at least one module scale information based on preset model scale information.
[0089] The second identification module 620 identifies at least one trained module based on at least one module size information and a plurality of initial modules of the initial model, where the trained module includes trained parameters identified from the initial modules based on the module size information.
[0090] The training module 630 trains at least one trained module based on training sample data to obtain at least one trained module, where the training sample data is obtained from at least one of text sample data, image sample data, audio sample data, and video sample data.
[0091] In some embodiments, the preset model size information includes a plurality of preset model size parameters, and a preset parameter number indicated by the preset model size parameters is equal to or less than a number of initial parameters of the initial model. The first identification module includes: a first identification sub-module for identifying a target model size parameter from the plurality of preset model size parameters based on a plurality of preset parameter probability values used for the plurality of preset model size parameters, where the preset parameter number indicated by the target model size parameter matches a number of trained parameters used for the at least one trained module; and a second identification sub-module for identifying at least one module size information to be used for the at least one initial module based on the target model size parameter.
[0092] In some embodiments, the second identification submodule further identifies latent variable size information and at least one module size information to be used for the at least one initial module based on the target model size parameter, where the latent variable size information is used to indicate the size of a latent variable to be used for the module to be trained.
[0093] In some embodiments, the second identification module includes a third identification sub-module for identifying a plurality of trained parameters to be included in the trained module from the initial module based on at least one of a plurality of sampling modes based on module size information used for the initial module, wherein the plurality of sampling modes includes a random sampling mode.
[0094] In some embodiments, the initial module includes at least one of an initial attention layer and an initial feedforward layer, and the training target module includes at least one of a training target attention layer and a training target feedforward layer. The second identification module includes at least one of a fourth identification sub-module for identifying training target attention data from the initial attention layer to the training target attention layer, the training target attention data including a plurality of training target attention parameters, based on module-size information used for the initial module, and a fifth identification sub-module for identifying training target feedforward data from the initial feedforward layer to the training target feedforward layer, the training target feedforward data including a plurality of training target feedforward parameters, based on module-size information used for the initial module.
[0095] In some embodiments, the initial attention layer includes initial attention data for each of a plurality of initial attention heads, and the initial attention data includes an initial query parameter matrix, an initial key parameter matrix, and an initial value parameter matrix. The fourth identifying submodule includes: a first identifying unit for identifying at least one initial attention data of the at least one initial attention head as at least one intermediate attention data of the at least one training target attention head; and a second identifying unit for identifying at least one training target attention data from the at least one intermediate attention data.
[0096] In some embodiments, the intermediate attention data includes an intermediate query parameter matrix, an intermediate key parameter matrix, and an intermediate value parameter matrix, and the training target attention data includes a training target query parameter matrix, a training target key parameter matrix, and a training target value parameter matrix. The second identifying unit includes at least one of a first identifying subunit for identifying at least one intermediate query parameter submatrix of the intermediate query parameter matrix as at least one training target query parameter submatrix of the training target query parameter matrix, a second identifying subunit for identifying at least one intermediate key parameter submatrix of the intermediate key parameter matrix as at least one training target key parameter submatrix of the training target key parameter matrix, and a third identifying subunit for identifying at least one intermediate value parameter submatrix of the intermediate value parameter matrix as at least one training target value parameter submatrix of the training target value parameter matrix.
[0097] In some embodiments, the initial feedforward parameter matrix of the initial feedforward layer includes a plurality of initial feedforward parameters, and the training target feedforward data includes at least one training target feedforward parameter sub-matrix. The fifth identifying sub-module includes a third identifying unit for identifying the at least one initial feedforward parameter sub-matrix of the initial feedforward parameter matrix as the at least one training target feedforward parameter sub-matrix.
[0098] In some embodiments, the initial module includes a plurality of initial expert units, and the second identification module includes a sixth identification sub-module for identifying at least one initial expert unit of the plurality of initial expert units as at least one expert unit to be trained of the module to be trained based on module size information used for the initial module.
[0099] FIG. 7 is a block diagram of a model deployment device according to one embodiment of the present disclosure. As shown in FIG. 7, the apparatus 700 may include a third identification module 710 and a deployment module 720.
[0100] The third identification module 710 identifies a deployment target model from the target model based on preset model scale information.
[0101] The deployment module 720 deploys the deployed model to a hardware device for the deployed model.
[0102] In some embodiments, the target model is obtained by training an initial model by performing related operations with a first identification module for identifying at least one module size information based on preset model size information, a second identification module for identifying at least one trained module based on the at least one module size information and a plurality of initial modules of the initial model, the trained module including trained parameters identified from the initial modules based on the module size information, and a training module for training the at least one trained module based on training sample data to obtain at least one trained module. The training sample data may be obtained from at least one of text sample data, image sample data, audio sample data, and video sample data. For example, the target model may be obtained by training an initial model using the above-mentioned device 600. The description of the above-mentioned device 600 also applies to this embodiment, and the description of the present disclosure will be omitted here.
[0103] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program.
[0104] 8 illustrates a schematic block diagram for implementing an exemplary electronic device 800 according to an embodiment of the present disclosure. The electronic device is intended to represent various types of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various types of mobile devices, such as personal digital assistants, mobile phones, smartphones, wearable devices, and other similar computing devices. The components, their connections and relationships, and their functions illustrated herein are merely exemplary and do not limit the implementation of the present disclosure as described and / or claimed herein.
[0105] 8, the device 800 includes a computing unit 801, which may perform various appropriate operations and processes based on a computer program stored in a read-only memory (ROM) 802 or loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may further store various programs and data necessary for the operation of the device 800. The computing unit 801, the ROM 802, and the RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0106] The components of the device 800 are connected to an I / O interface 805, which includes an input unit 806 such as a keyboard, a mouse, etc., an output unit 807 such as various types of displays, speakers, etc., a storage unit 808 such as a magnetic disk, an optical disk, etc., and a communication unit 809 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 enables the device 800 to exchange information and data with other devices via a computer network such as the Internet and / or various electrical networks.
[0107] The computing unit 801 may be various general-purpose and / or specialized processing modules having processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, computing units running various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs each of the methods and processes described above, such as at least one of a model training method and a model deployment method. For example, in some embodiments, at least one of a model training method and a model deployment method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, some or all of the computer program may be loaded and / or installed into the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, it may perform one or more steps of at least one of the model training method and the model deployment method described above. Alternatively, in other embodiments, the computing unit 801 may be arranged to perform at least one of the model training method and the model deployment method in any other suitable manner (e.g., via firmware).
[0108] Various embodiments of the systems and techniques described herein above may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that can be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and that can receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0109] Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, so that when the program code is executed by the processor or controller, the functions and operations specified in the flowcharts and / or block diagrams are performed. The program code may be executed entirely on a device, partially on a device, partially on a device as a separate software package, and partially on a remote device, or entirely on a remote device or server.
[0110] In the context of this disclosure, a machine-readable medium may be a tangible medium, and may contain or store a program for use in or in connection with an instruction execution system, device, or electronic device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection of one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0111] To provide for user interaction, a computer may implement the systems and techniques described herein and include a display device (e.g., a cathode ray tube (CRT) display or a liquid crystal display (LCD)) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the computer. Other types of devices may also provide for user interaction; for example, the feedback provided to the user may be any form of sensing feedback (e.g., visual feedback, auditory feedback, or tactile feedback) and may receive input from the user in any form (including voice input, speech input, or tactile input).
[0112] The systems and techniques described herein can be implemented in a computing system including background components (e.g., a data server), or middleware components (e.g., an application server), or front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, middleware, or front-end components. The components of the system can be connected to each other by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include, by way of example, a local area network (LAN), a wide area network (WAN), and the Internet.
[0113] A computer system may include clients and servers. Clients and servers are generally remote and typically interact through a communication network. The relationship of client and server is created by computer programs running on the corresponding computers and having the client-server relationship.
[0114] It should be understood that various types of flows shown above may be used, and operations may be rearranged, added, or deleted. For example, the operations described in this disclosure may be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this specification is not limited thereto.
[0115] The above specific embodiments do not limit the scope of protection of the present disclosure. Those skilled in the art should understand that various modifications, combinations, subcombinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present disclosure should be included within the scope of protection of the present disclosure.
Claims
1. Identifying at least one module scale information based on preset model scale information; identifying, based on at least one of the module size information and a plurality of initial modules of an initial model, at least one trained module including trained parameters identified from the initial modules based on the module size information; training at least one said trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module; Model training method.
2. the preset model scale information includes a plurality of preset model scale parameters, and the number of preset parameters indicated by the preset model scale parameters is equal to or less than the number of initial parameters of the initial model; Identifying at least one module scale information according to the preset model scale information includes: identifying a target model size parameter from the plurality of preset model size parameters based on a plurality of preset parameter probability values used for the plurality of preset model size parameters, wherein a number of preset parameters indicated by the target model size parameter matches a number of trained parameters used for at least one of the trained modules; and identifying at least one of the module scale information to be used for at least one of the initial modules based on the target model scale parameters. The method of claim 1.
3. Identifying at least one of the module size information to be used for at least one of the initial modules based on the target model size parameter includes: and determining latent variable size information for indicating the size of a latent variable to be used in the module to be trained and at least one module size information to be used in at least one of the initial modules based on the target model size parameter. The method of claim 2.
4. Identifying at least one module to be trained based on the at least one module size information and a plurality of initial modules of an initial model includes: and identifying a plurality of trained parameters to be included in the trained module from the initial module based on at least one of a plurality of sampling modes including a random sampling mode based on module size information used for the initial module. The method of claim 1.
5. The initial module includes at least one of an initial attention layer and an initial feedforward layer, and the trained module includes at least one of a trained attention layer and a trained feedforward layer; Identifying at least one module to be trained based on the at least one module size information and a plurality of initial modules of an initial model includes: Identifying training target attention data of the training target attention layer from the initial attention layer based on module size information used for the initial module, the training target attention data including a plurality of training target attention parameters; and identifying training target feedforward data including a plurality of training target feedforward parameters from the initial feedforward layer to the training target feedforward layer based on module size information used for the initial module. The method of claim 1.
6. The initial attention layer includes initial attention data for each of a plurality of initial attention heads, and the initial attention data includes an initial query parameter matrix, an initial key parameter matrix, and an initial value parameter matrix; Identifying training target attention data of the training target attention layer from the initial attention layer includes: Identifying at least one of the initial attention data of at least one of the initial attention heads as at least one of the intermediate attention data of at least one of the training target attention heads; and identifying at least one piece of training target attention data from at least one piece of intermediate attention data. The method of claim 5.
7. The intermediate attention data includes an intermediate query parameter matrix, an intermediate key parameter matrix, and an intermediate value parameter matrix, and the training target attention data includes a training target query parameter matrix, a training target key parameter matrix, and a training target value parameter matrix; Identifying at least one piece of training target attention data from the at least one piece of intermediate attention data includes: identifying at least one intermediate query parameter sub-matrix of the intermediate query parameter matrix as at least one training subject query parameter sub-matrix of the training subject query parameter matrix; identifying at least one intermediate key parameter sub-matrix of the intermediate key parameter matrix as at least one training target key parameter sub-matrix of the training target key parameter matrix; identifying at least one intermediate value parameter sub-matrix of the intermediate value parameter matrix as at least one training object value parameter sub-matrix of the training object value parameter matrix. The method of claim 6.
8. an initial feedforward parameter matrix of the initial feedforward layer including a plurality of initial feedforward parameters, and the training subject feedforward data including at least one training subject feedforward parameter sub-matrix; Identifying training target feedforward data of the training target feedforward layer from the initial feedforward layer includes: identifying at least one initial feedforward parameter sub-matrix of the initial feedforward parameter matrix as at least one of the feedforward parameter sub-matrix to be trained; The method of claim 6.
9. the initial module includes a plurality of initial expert units; Identifying at least one module to be trained based on the at least one module size information and a plurality of initial modules of an initial model includes: identifying at least one of the initial expert units as at least one expert unit to be trained of the module to be trained based on module size information used for the initial module; The method of claim 1.
10. Identifying a deployment target model from the target model based on preset model size information; deploying the deployed model to a hardware device for the deployed model; The target model is An operation of identifying at least one piece of module scale information based on the preset model scale information; identifying, based on at least one of the module size information and a plurality of initial modules of the initial model, at least one training target module including training target parameters identified from the initial modules based on the module size information; training the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module; Model deployment method.
11. a first identification module that identifies at least one piece of module scale information based on preset model scale information; a second identification module that identifies, based on at least one of the module size information and a plurality of initial modules of an initial model, at least one training target module including training target parameters identified from the initial modules based on the module size information; a training module for training the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module; Model training equipment.
12. a third identification module that identifies a deployment target model from the target model based on preset model size information; a deployment module that deploys the target model to a hardware device for the target model; The target model is a first identification module that identifies at least one piece of module scale information based on the preset model scale information; a second identification module that identifies, based on at least one of the module size information and a plurality of initial modules of the initial model, at least one training target module including training target parameters identified from the initial modules based on the module size information; and a training module that trains the at least one trained module based on training sample data obtained from at least one of text sample data, image sample data, audio sample data, and video sample data to obtain at least one trained module, by performing related operations to train the initial model. Module deployment device.
13. at least one processor; a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor can perform the method of any one of claims 1 to 10; electronic equipment.
14. A non-transitory computer-readable storage medium having computer instructions stored thereon, comprising: The computer instructions are used to cause the computer to carry out the method according to any one of claims 1 to 10. A non-transitory computer-readable storage medium.
15. A computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.