A model parameter updating method and component

By deploying encoding layers and decoding layers with parameter sharing relationships on the pipeline, and performing parallel pipeline processing and gradient reduction, the problem of low computing and communication efficiency in large model training is solved, and efficient model parameter updates are achieved.

CN114416377BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
0 Cites 0 Cited by

Patent Information

Application Number
CN202210110302.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-29
Publication Date
2024-10-22
Estimated Expiration
2042-01-29

AI Technical Summary

Technical Problem

In the process of large model training, existing technology is difficult to effectively combine pipeline parallelism and parameter sharing technology, resulting in low computing efficiency and communication efficiency.

Method used

By deploying the encoding layer and decoding layer with parameter sharing relationships on the pipeline, and performing parallel pipeline processing between computing devices, forward propagation and back propagation are used to update parameters, avoiding redundant data communication, and using the all-reduce algorithm Perform gradient reduction.

Benefits of technology

It improves the computing efficiency and communication efficiency of the model, reduces communication waiting and data volume during the calculation process, and realizes efficient pipeline parallel computing in large model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416377B_ABST
    Figure CN114416377B_ABST
Patent Text Reader

Abstract

The present application discloses a model parameter updating method and component, including: inputting sample data to the first computing device on the pipeline in sequence; starting from the first computing device, using the coding layer to perform a first forward propagation on the input sample data to obtain a coding result, storing the coding result in each computing device on the pipeline, starting from the first computing device, using the decoding layer to perform a second forward propagation on the coding result to obtain a decoding result; starting from the last computing device, using the decoding layer to perform a first back propagation according to the decoding result to obtain a gradient value, performing a reduction operation on all gradient values ​​in the last computing device, starting from the last computing device, using the coding layer to perform a second back propagation according to the reduction operation result, and then updating the hierarchical parameters of the model composed of the coding layer and the decoding layer according to the second back propagation result. It can improve the model calculation efficiency in the large model training process by combining pipeline parallelism and parameter sharing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a model parameter updating method, device, equipment and storage medium. Background Art

[0002] The model composed of the encoder layer and the decoder layer can achieve pipeline parallelism during the training process. Among them, the Transformer structure model, which is basically used in natural language processing models, is a typical model. The BERT (Bidirectional Encoder Representation from Transformers) model uses the encoder module stacked from the Transformer, the GPT (Gererate Pre-Training Model) model uses the decoder module stacked from the Transformer, and the T5 model completely uses the encoder-decoder model structure of the Transformer. However, for such models, as the scale of the model increases, the memory capacity can no longer meet the needs of the model scale. Some researchers have proposed parameter sharing technology, that is, the same parameters are used for encoding and decoding, so that the number of parameters of the model can be saved by half. According to the existing pipeline parallel scheme, different encoder layers and decoder layers can be deployed on different computing devices. Although pipeline parallelism can be achieved, it is not applicable to the parameter-sharing Transformer structure model.

[0003] Therefore, how to combine pipeline parallelism and parameter sharing technology to improve model computing efficiency during large model training is a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a model parameter updating method, device, equipment and storage medium, which can improve the model calculation efficiency by combining pipeline parallelization and parameter sharing technology in the large model training process. The specific scheme is as follows:

[0005] A first aspect of the present application provides a model parameter updating method, comprising:

[0006] The sample data in the training sample sequence are sequentially input to the first computing device on the pipeline; wherein each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers;

[0007] Starting from the first computing device, the encoding layer is used to perform a first forward propagation on the input sample data to obtain an encoding result output by the encoding layer deployed in the last computing device, and the encoding result is stored in each computing device on the pipeline, so as to start from the first computing device and perform a second forward propagation on the encoding result by using the decoding layer to obtain a corresponding decoding result;

[0008] Starting from the last computing device, a first back propagation is performed using the decoding layer according to the decoding result to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device, so as to start from the last computing device and perform a second back propagation using the encoding layer according to the reduction operation result, and then update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the second back propagation result.

[0009] Optionally, before sequentially inputting the sample data in the training sample sequence to the first computing device on the pipeline, the method further includes:

[0010] A training set is obtained and split into two parts to obtain a corresponding training sample sequence including a plurality of sample data.

[0011] Optionally, updating the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the second back propagation result includes:

[0012] A reduction operation is performed on the gradient value corresponding to the second back propagation result of each sample data in the training sample sequence, so as to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the reduction operation result.

[0013] Optionally, performing a reduction operation on the gradient value corresponding to the second back propagation result of each sample data in the training sample sequence to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the reduction operation result includes:

[0014] A summation operation is performed on the gradient values ​​corresponding to the second back propagation results of each sample data in the training sample sequence, so as to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the accumulated gradient values.

[0015] Optionally, storing the encoding result to each computing device on the pipeline includes:

[0016] The encoding result is stored in each computing device in the pipeline by broadcasting the encoding result to each computing device in the pipeline.

[0017] Optionally, the reducing operation of all gradient values ​​in the last computing device includes:

[0018] The all-reduce algorithm is used to reduce all gradient values ​​in the last computing device.

[0019] Optionally, the computing device on the pipeline is a GPU device.

[0020] A second aspect of the present application provides a model parameter updating device, comprising:

[0021] An input module is used to sequentially input sample data in the training sample sequence to the first computing device on the pipeline; wherein each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers;

[0022] A forward computing module, configured to obtain an encoding result output by the encoding layer deployed in the last computing device after performing a first forward propagation on the input sample data using the encoding layer from the first computing device, and store the encoding result in each computing device on the pipeline, so as to obtain a corresponding decoding result after performing a second forward propagation on the encoding result using the decoding layer from the first computing device;

[0023] A reverse calculation module is used to start from the last computing device, perform a first back propagation using the decoding layer according to the decoding result to obtain a gradient value corresponding to each computing device, and perform a reduction operation on all gradient values ​​in the last computing device, so as to start from the last computing device, perform a second back propagation using the encoding layer according to the reduction operation result, and then update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the second back propagation result.

[0024] A third aspect of the present application provides an electronic device, comprising a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the aforementioned model parameter updating method.

[0025] The fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the aforementioned model parameter updating method is implemented.

[0026] In the present application, the sample data in the training sample sequence are first input into the first computing device on the pipeline in sequence; wherein each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on the different input sample data based on the calculation order between the layers; then, starting from the first computing device, the coding layer is used to perform a first forward propagation on the input sample data to obtain the coding result output by the coding layer deployed in the last computing device, and the coding result is stored in each computing device on the pipeline, so as to perform a second forward propagation on the coding result using the decoding layer starting from the first computing device to obtain the corresponding decoding result; finally, starting from the last computing device, the decoding layer is used to perform a first back propagation according to the decoding result to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device, so as to perform a second back propagation according to the reduction operation result using the coding layer starting from the last computing device, and then update the hierarchical parameters of the model composed of the coding layer and the decoding layer according to the second back propagation result. This application deploys the encoding layer and decoding layer with the same parameters on the same computing device on the pipeline to realize pipeline parallel computing, avoiding redundant data communication caused by sharing parameters during the calculation process, and can combine pipeline parallelism and parameter sharing technology to improve model computing efficiency and communication efficiency during large model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0028] Figure 1 A flow chart of a model parameter updating method provided in this application;

[0029] Figure 2 A schematic diagram of a specific Transformer structure model provided for this application;

[0030] Figure 3 A schematic diagram of a flow stage provided for this application;

[0031] Figure 4 A schematic diagram of a specific model parameter updating process provided in this application;

[0032] Figure 5 A schematic diagram of the structure of a model parameter updating device provided in this application;

[0033] Figure 6A structural diagram of an electronic device for updating model parameters provided in this application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] As the number of model parameters continues to increase, a single video memory can no longer meet the needs of model training. The existing pipeline parallel algorithm will only transfer data to the device of the next pipeline stage after each pipeline stage is completed, which will lead to low data communication efficiency when parameters are shared. In response to the above technical defects, this application provides a model parameter update solution that can improve the model calculation efficiency and communication efficiency by combining pipeline parallelism and parameter sharing technology during large model training.

[0036] Figure 1 A flow chart of a model parameter updating method provided in an embodiment of the present application. Figure 1 As shown, the model parameter updating method includes:

[0037] S11: Input the sample data in the training sample sequence to the first computing device on the pipeline in sequence. Each computing device is deployed with a coding layer and a decoding layer with a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers.

[0038] In this embodiment, the sample data in the training sample sequence are first input into the first computing device on the pipeline in sequence. In order to construct the training sample sequence, it is first necessary to obtain a training set, and then split the training set to obtain the corresponding training sample sequence containing multiple sample data. That is, in a training process, a batch of data is split into multiple micro_batches, and a micro_batch of sample data is input into the computing device each time. After the forward propagation and back propagation calculations of the entire batch of data are completed, the gradient of the parameters is reduced to achieve a cumulative gradient result, and the cumulative gradient result is used to perform parameter update calculations.

[0039] This embodiment takes the Transformer structure model as an example. The Transformer structure model consists of an Encoder module and a Decoder module. Figure 2As shown. Each Encoder module consists of n Encoder layers, and each Decoder module consists of n Decoder layers. After completing the calculations of all Encoder layers, an Encoder output result can be obtained in the last Encoder layer. This result will be sent to all Decoder layers for calculations in the Decoder module. Figure 3 When the pipeline architecture shown is implemented in parallel, the model is evenly divided into 4 parts. After completing the calculation of the first stage Stage1, the calculation result is passed to the next computing device to perform the calculation of the second stage Stage2, and the entire model is calculated in sequence. After the fourth stage Stage4 completes the forward propagation calculation, reverse propagation begins, and the gradient value is reversely propagated from Stage4 to Stage1 in sequence until Stage1 completes the reverse propagation calculation and updates all parameter values. Among them, the computing device on the pipeline is a GPU device (GPU video memory).

[0040] The above process will only transfer data to the device of the next pipeline stage after each pipeline stage is completed. This method is fine when using a model with a simple Encoder or Decoder structure. However, when using an Encoder+Decoder structure model, the output result of the last Encoder layer needs to be passed to the computing device of the next pipeline stage each time, which results in low data communication efficiency. In this embodiment, each computing device is deployed with an encoding layer and a decoding layer with a parameter sharing relationship. The computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers. That is, Figure 3 In the pipeline architecture, the Encoder layer and Decoder layer with shared parameters are deployed on the same computing device. The Encoder stage performs serial calculations. After each computing device completes a layer of calculations, it sends the calculation results to the next computing device as input data.

[0041] S12: Starting from the first computing device, the encoding layer is used to perform a first forward propagation on the input sample data to obtain the encoding result output by the encoding layer deployed in the last computing device, and the encoding result is stored in each computing device on the pipeline, so as to start from the first computing device and perform a second forward propagation on the encoding result using the decoding layer to obtain the corresponding decoding result.

[0042] In this embodiment, for the forward propagation process of a sample data, the first computing device uses the encoding layer to perform the first forward propagation on the input sample data, and then obtains the encoding result output by the encoding layer deployed in the last computing device. Specifically, after micro_batch0 (the first input sample data) completes the forward propagation calculation of Encoder-0 (the first Encoder layer) on the first pipeline stage computing device, the output result is passed to the next pipeline stage computing device to continue the forward propagation calculation. At the same time, the first pipeline stage computing device begins to process the forward propagation of micro_batch1 (the second input sample data). Until micro_batch0 completes the forward propagation process of Encoder-p in the last pipeline computing stage computing device.

[0043] Then the encoding result (the output result of Encoder-p) is stored in each computing device on the pipeline. In this embodiment, the encoding result can be stored in each computing device on the pipeline by broadcasting the encoding result to each computing device on the pipeline. After the broadcast operation is performed on all computing devices, each pipeline computing device will save a copy of the output result of Encoder-p. Then, starting from the first computing device, the encoding result is forward propagated for the second time using the decoding layer to obtain the corresponding decoding result. That is, the forward propagation calculation of Deocder-{0~p} is calculated on the computing device at each pipeline stage.

[0044] S13: Starting from the last computing device, a first back propagation is performed using the decoding layer according to the decoding result to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device, so as to start from the last computing device, a second back propagation is performed using the encoding layer according to the reduction operation result, and then the hierarchical parameters of the model composed of the encoding layer and the decoding layer are updated according to the second back propagation result.

[0045] In this embodiment, for a backward propagation process of sample data that has completed forward propagation, the first backward propagation is performed using the decoding layer according to the decoding result starting from the last computing device to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device. After completing the forward propagation calculation, the backward propagation calculation of the Decoder layer is performed on the pipeline computing device {p~0} in sequence. After the first pipeline stage completes the backward propagation calculation of Decoder-0, the gradient values ​​of the output results of Encoder-p on all pipeline computing devices are reduced to the computing device of the last pipeline stage for backward propagation on the Encoder layer. Specifically, the all-reduce algorithm can be used to reduce all gradient values ​​in the last computing device.

[0046] On this basis, the back propagation calculation of the Encoder layer is performed on the {p~0} pipeline stage computing devices in turn, that is, starting from the last computing device, the second back propagation is performed using the encoding layer according to the result of the reduction operation, and then the hierarchical parameters of the model composed of the encoding layer and the decoding layer are updated according to the second back propagation result. It should be noted that for a training sample batch, after all micro_batch sample data complete operations 0~7, the parameter gradient reduction operation and parameter update are started. That is, the gradient value corresponding to the second back propagation result of each sample data in the training sample sequence is reduced to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the reduction operation result. Specifically, the gradient value corresponding to the second back propagation result of each sample data in the training sample sequence is summed to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the accumulated gradient value.

[0047] The above steps are the pipeline implementation process of a sample data. Multiple sample data can be pipelined in parallel. The overall pipeline parallel implementation process is as follows: Figure 4As shown (only as an example, the repeated part is not fully shown), each row represents a computing device, x (0, 1...) represents the forward propagation calculation process of the Encoder layer and the Decoder of the sample data of the xth input, b{x} represents the reverse propagation calculation process of the Encoder layer and the Decoder, and bc{x} represents broadcasting the output result of the sample data of the xth input at the last Encoder layer to all computing devices on the pipeline. Since the result of the xth sample data at the last Encoder layer is broadcast to each computing device, a gradient value will be generated in each pipeline stage during the reverse propagation process of the Decoder layer. Therefore, all gradient values ​​need to be reduced before the reverse propagation of the last Encoder layer, which is the process represented by r{x} in the figure. This embodiment can efficiently implement the pipeline parallel computing process of the Encoder-Decoder structure NLP model on a small number of computing nodes. Through the pipeline parallel communication algorithm, the communication waiting and the amount of communication data in the computing process can be reduced as much as possible. At the same time, efficient algorithms such as ring broadcast can be used to further improve the communication efficiency of the broadcast process.

[0048] It can be seen that the embodiment of the present application first inputs the sample data in the training sample sequence into the first computing device on the pipeline in sequence; wherein, each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on the different input sample data based on the calculation order between the layers; then, starting from the first computing device, the coding layer is used to perform a first forward propagation on the input sample data to obtain the coding result output by the coding layer deployed in the last computing device, and the coding result is stored in each computing device on the pipeline, so as to perform a second forward propagation on the coding result using the decoding layer starting from the first computing device to obtain the corresponding decoding result; finally, starting from the last computing device, the decoding layer is used to perform a first back propagation according to the decoding result to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device, so as to perform a second back propagation according to the reduction operation result using the coding layer starting from the last computing device, and then update the hierarchical parameters of the model composed of the coding layer and the decoding layer according to the second back propagation result. This application deploys the encoding layer and decoding layer with the same parameters on the same computing device on the pipeline to realize pipeline parallel computing, avoiding redundant data communication caused by sharing parameters during the calculation process, and can combine pipeline parallelism and parameter sharing technology to improve model computing efficiency and communication efficiency during large model training.

[0049] See also Figure 3 As shown, the embodiment of the present application also discloses a parameter updating device of a Transformer structure model, including:

[0050] An input module 11 is used to sequentially input the sample data in the training sample sequence to the first computing device on the pipeline; wherein each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers;

[0051] A forward computing module 12 is used to perform a first forward propagation on the input sample data using the encoding layer from the first computing device to obtain an encoding result output by the encoding layer deployed in the last computing device, and store the encoding result in each computing device on the pipeline, so as to perform a second forward propagation on the encoding result using the decoding layer from the first computing device to obtain a corresponding decoding result;

[0052] The reverse calculation module 13 is used to start from the last calculation device, perform a first back propagation using the decoding layer according to the decoding result to obtain the gradient value corresponding to each calculation device, and perform a reduction operation on all the gradient values ​​in the last calculation device, so as to start from the last calculation device, perform a second back propagation using the encoding layer according to the reduction operation result, and then update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the second back propagation result.

[0053] It can be seen that the embodiment of the present application first inputs the sample data in the training sample sequence into the first computing device on the pipeline in sequence; wherein, each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on the different input sample data based on the calculation order between the layers; then, starting from the first computing device, the coding layer is used to perform a first forward propagation on the input sample data to obtain the coding result output by the coding layer deployed in the last computing device, and the coding result is stored in each computing device on the pipeline, so as to perform a second forward propagation on the coding result using the decoding layer starting from the first computing device to obtain the corresponding decoding result; finally, starting from the last computing device, the decoding layer is used to perform a first back propagation according to the decoding result to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device, so as to perform a second back propagation according to the reduction operation result using the coding layer starting from the last computing device, and then update the hierarchical parameters of the model composed of the coding layer and the decoding layer according to the second back propagation result. This application deploys the encoding layer and decoding layer with the same parameters on the same computing device on the pipeline to realize pipeline parallel computing, avoiding redundant data communication caused by sharing parameters during the calculation process, and can combine pipeline parallelism and parameter sharing technology to improve model computing efficiency and communication efficiency during large model training.

[0054] In some specific embodiments, the parameter updating device of the Transformer structure model further includes:

[0055] The acquisition and splitting module is used to acquire a training set and split the training set to obtain the corresponding training sample sequence containing multiple sample data.

[0056] In some specific embodiments, the forward calculation module 12 further includes:

[0057] A broadcast unit is used to store the encoding result in each computing device on the pipeline by broadcasting the encoding result to each computing device on the pipeline.

[0058] In some specific embodiments, the reverse calculation module 13 further includes:

[0059] A reduction unit, configured to perform a reduction operation on a gradient value corresponding to a second back propagation result of each sample data in the training sample sequence, so as to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the reduction operation result;

[0060] The protocol unit specifically includes:

[0061] A first reduction subunit is used to sum the gradient values ​​corresponding to the second back propagation results of each sample data in the training sample sequence, so as to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the accumulated gradient values;

[0062] The second reduction subunit is used to perform a reduction operation on all gradient values ​​in the last computing device using an all-reduce algorithm.

[0063] Furthermore, an embodiment of the present application also provides an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0064] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the model parameter updating method disclosed in any of the aforementioned embodiments.

[0065] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0066] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0067] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the model parameter updating method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. The data 223 can include sample data collected by the electronic device 20.

[0068] Furthermore, an embodiment of the present application also discloses a storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the model parameter updating method steps disclosed in any of the aforementioned embodiments are implemented.

[0069] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0070] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0071] The model parameter updating method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A model parameter updating method, characterized in that: include: The sample data in the training sample sequence are sequentially input to the first computing device on the pipeline; wherein each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers; Starting from the first computing device, the encoding layer is used to perform a first forward propagation on the input sample data to obtain an encoding result output by the encoding layer deployed in the last computing device, and the encoding result is stored in each computing device on the pipeline, so as to start from the first computing device and perform a second forward propagation on the encoding result by using the decoding layer to obtain a corresponding decoding result; Starting from the last computing device, a first back propagation is performed using the decoding layer according to the decoding result to obtain the gradient value corresponding to each computing device, and all the gradient values ​​are reduced in the last computing device, so as to start from the last computing device and perform a second back propagation using the encoding layer according to the reduction operation result, and then update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the second back propagation result.

2. The model parameter updating method according to claim 1, characterized in that: Before sequentially inputting the sample data in the training sample sequence into the first computing device on the pipeline, the method further includes: A training set is obtained and split into two parts to obtain a corresponding training sample sequence including a plurality of sample data.

3. The model parameter updating method according to claim 2, characterized in that: According to the second back propagation result, the hierarchical parameters of the model composed of the encoding layer and the decoding layer are updated, including: A reduction operation is performed on the gradient value corresponding to the second back propagation result of each sample data in the training sample sequence, so as to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the reduction operation result.

4. The model parameter updating method according to claim 3, characterized in that: The step of performing a reduction operation on the gradient value corresponding to the second back propagation result of each sample data in the training sample sequence to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the reduction operation result includes: A summation operation is performed on the gradient values ​​corresponding to the second back propagation results of each sample data in the training sample sequence, so as to update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the accumulated gradient values.

5. The model parameter updating method according to claim 1, characterized in that: The step of storing the encoding result in each computing device on the pipeline comprises: The encoding result is stored in each computing device in the pipeline by broadcasting the encoding result to each computing device in the pipeline.

6. The model parameter updating method according to claim 1, characterized in that: The reducing operation of all gradient values ​​in the last computing device includes: The all-reduce algorithm is used to reduce all gradient values ​​in the last computing device.

7. The model parameter updating method according to any one of claims 1 to 6, characterized in that: The computing device on the pipeline is a GPU device.

8. A model parameter updating device, characterized in that: include: An input module is used to sequentially input sample data in the training sample sequence to the first computing device on the pipeline; wherein each computing device is deployed with a coding layer and a decoding layer having a parameter sharing relationship, and the computing devices on the pipeline perform parallel pipeline processing on different input sample data based on the calculation order between the layers; A forward computing module, configured to obtain an encoding result output by the encoding layer deployed in the last computing device after performing a first forward propagation on the input sample data using the encoding layer from the first computing device, and store the encoding result in each computing device on the pipeline, so as to obtain a corresponding decoding result after performing a second forward propagation on the encoding result using the decoding layer from the first computing device; A reverse calculation module is used to start from the last computing device, perform a first back propagation using the decoding layer according to the decoding result to obtain a gradient value corresponding to each computing device, and perform a reduction operation on all gradient values ​​in the last computing device, so as to start from the last computing device, perform a second back propagation using the encoding layer according to the reduction operation result, and then update the hierarchical parameters of the model composed of the encoding layer and the decoding layer according to the second back propagation result.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the model parameter updating method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer executable instructions, which, when loaded and executed by a processor, implement the model parameter updating method according to any one of claims 1 to 7.