WO2024093573A1 - 用于训练机器学习模型的方法、装置、设备和介质 - Google Patents
用于训练机器学习模型的方法、装置、设备和介质 Download PDFInfo
- Publication number
- WO2024093573A1 WO2024093573A1 PCT/CN2023/120501 CN2023120501W WO2024093573A1 WO 2024093573 A1 WO2024093573 A1 WO 2024093573A1 CN 2023120501 W CN2023120501 W CN 2023120501W WO 2024093573 A1 WO2024093573 A1 WO 2024093573A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sub
- model
- computing node
- computing
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0499—Feedforward networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- Example embodiments of the present disclosure relate generally to machine learning, and more particularly to methods, apparatuses, devices, and computer-readable storage media for training machine learning models.
- Machine learning models can be used to perform tasks in a variety of application environments. As the tasks to be processed become more complex, the structure of the machine learning model becomes more complex and the size increases, which makes it difficult to train the machine learning model at a single computing node.
- a distributed training method for training machine learning models at multiple computing nodes has been proposed. However, during training, training data needs to be transmitted between the computing nodes. On the one hand, the transmission process requires a large amount of bandwidth, and on the other hand, the blocking training process causes each computing node to have to wait until the training data is received before determining the update parameters of the model. At this point, how to use multiple computing nodes to train machine learning models in a more efficient way has become an urgent problem to be solved.
- a method for training a machine learning model includes a first sub-model and a second sub-model, the first sub-model is located at a first computing node in a computing system, and the second sub-model is located at a second computing node in the computing system.
- a data stream for training the machine learning model is received at the first computing node.
- a first set of training data is provided at the first computing node.
- a second sub-model is obtained from a second computing node.
- the first set of training data is input to the first sub-model and the obtained second sub-model respectively to determine a first update parameter for updating the first sub-model and a second update parameter for updating the second sub-model.
- a device for training a machine learning model includes a first sub-model and a second sub-model, the first sub-model is located at a first computing node in a computing system, and the second sub-model is located at a second computing node in the computing system.
- the device includes: a receiving module configured to receive a first set of training data for training the machine learning model at the first computing node; an acquisition module configured to acquire the second sub-model from the second computing node; a determination module configured to input the first set of training data to the first sub-model and the acquired second sub-model, respectively, to determine a first update parameter for updating the first sub-model and a second update parameter for updating the second sub-model; and a transmission module configured to transmit the second update parameter to the second computing node.
- an electronic device in a third aspect of the present disclosure, includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
- a computer-readable storage medium wherein a computer program is stored on the medium, and when the computer program is executed by a processor, the method of the first aspect is implemented.
- FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented
- FIG. 2 shows a process for training a machine learning model according to a technical solution. block diagram
- FIG3 illustrates a block diagram of a process for training a machine learning model according to some embodiments of the present disclosure
- FIG4 is a block diagram showing the structure of a computing system for training a machine learning model according to some embodiments of the present disclosure
- FIG5 is a block diagram showing a topology structure between computing devices and computing nodes according to some embodiments of the present disclosure
- FIG. 6 illustrates a block diagram of a process for obtaining a sub-model from a computing node located on the same computing device according to some embodiments of the present disclosure
- FIG7 illustrates a block diagram of a comparison of multiple training processes according to some embodiments of the present disclosure
- FIG8A illustrates a block diagram of a timing of transmitting a sub-model between multiple computing nodes according to some embodiments of the present disclosure
- FIG8B illustrates a block diagram of the timing of transmitting sub-models between multiple computing nodes according to some embodiments of the present disclosure
- FIG. 9 illustrates a block diagram of a process for obtaining a sub-model from a computing node located on a different computing device according to some embodiments of the present disclosure
- 10A is a block diagram illustrating a first stage of a process of acquiring multiple sub-models from different computing devices according to some embodiments of the present disclosure
- 10B illustrates a block diagram of the second stage of a process of acquiring multiple sub-models from different computing devices according to some embodiments of the present disclosure
- FIG11 shows a flowchart of a method for training a machine learning model according to some embodiments of the present disclosure
- FIG12 shows a block diagram of an apparatus for training a machine learning model according to some implementations of the present disclosure.
- FIG. 13 illustrates an electronic device in which one or more embodiments of the present disclosure may be implemented.
- model can represent the association relationship between various data. For example, the above-mentioned association relationship can be obtained based on a variety of technical solutions currently known and/or to be developed in the future.
- a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information.
- the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
- the prompt information in response to receiving an active request from the user, is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form.
- the pop-up window can also carry a selection control for the user to choose "agree” or “disagree” to provide personal information to the electronic device.
- the term "in response to” as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of executing a subsequent action executed in response to the event or condition is not necessarily strongly related to the time when the event occurs or the condition is satisfied. For example, in some cases, the subsequent action may be executed immediately when the event occurs or the condition is satisfied; while in other cases, the subsequent action may be executed some time after the event occurs or the condition is satisfied.
- FIG. 1 shows a block diagram of an example environment 100 in which implementations of the present disclosure can be implemented.
- a machine learning model 110 can be trained using training data (e.g., tokens) 112.
- the machine learning model 110 can be a model implemented based on a Mixture of Experts (MoE). MoE can decompose a task into several subtasks and train a corresponding submodel (also called an expert model) on each subtask. A gating model can be used to determine which submodel to activate. As shown in FIG.
- MoE Mixture of Experts
- a machine learning model 110 based on MoE can include an upstream model 120, a gating model 122, and a plurality of submodels 130, 132, ..., and 134. Further, the output of the machine learning model 110 can be used as an input to a downstream model 114.
- FIG. 2 shows a block diagram 200 of a process for training a machine learning model according to a technical solution.
- sub-model 130 can be deployed and trained at computing node 210
- sub-model 132 can be deployed and trained at computing node 220.
- data 0 and data 1 can be input to computing node 210
- data 2 and data 1 can be input to computing node 220. 3.
- each sub-model needs to use each data in order to complete the training process.
- computing node 210 needs to transmit data 0 to computing node 220 so that data 0 and data 3 are used at computing node 220 to determine the update parameters of sub-model 132.
- computing node 220 needs to transmit data 2 to computing node 210 so that data 1 and data 2 are used at computing node 220 to determine the update parameters of sub-model 130.
- FIG. 2 only schematically illustrates the communication between two computing nodes 210 and 220.
- the communication between the multiple computing nodes will occupy a large amount of communication bandwidth.
- each computing node needs to wait for the training data, which further increases the time overhead of the training phase. At this time, it is expected to use multiple computing nodes to train the machine learning model in a more efficient way.
- a method for training a machine learning model is proposed.
- a “data-centric” technical solution is proposed.
- the "data-centric” technical solution refers to deploying multiple sub-models at multiple computing nodes respectively, the location of the training data is fixed and the sub-models are transmitted between each computing node.
- the machine learning model herein may include sub-models 130 and 132, and a computing system for performing a training task may include computing nodes 210 and 220.
- sub-models 130 and 132 may be referred to as first sub-models and second sub-models, respectively, and computing nodes 210 and 220 may be referred to as first computing nodes and second computing nodes, respectively.
- sub-model 130 may be deployed at computing node 210
- sub-model 132 may be deployed at computing node 220.
- the training task can be performed in multiple training stages, and a corresponding set of training data can be input to each sub-model in each training stage.
- a first set of training data e.g., including data 0 and data 1
- the gating model in the machine learning model can determine which sub-module will be activated by the training data.
- computing node 210 can obtain sub-model 132 from computing node 220 when needed; and as shown by arrow 320, computing node 220 can obtain sub-model 130 from computing node 210 when needed.
- a set of training data may be input to the sub-model 130 and the acquired sub-model 132', respectively, to determine a first update parameter for updating the sub-model 130 and a second update parameter for updating the second sub-model 132.
- the update parameters of each sub-model may be determined based on a variety of optimization methods currently known and/or to be developed in the future. It will be understood that, since each computing node maintains its own local sub-model, it is necessary to transmit the second update parameter to the local computing node 220 where the sub-model 132 is located, so that the computing node 220 updates its local sub-model 132.
- a second set of training data (e.g., including data 2 and data 3) for training the machine learning model may be received.
- Submodel 130 may be acquired from computing node 210, and the second set of training data may be input to the acquired submodel 130′ and submodel 132, respectively, to determine update parameters for updating submodel 130 and update parameters for updating second submodel 132. Further, the update parameters for updating submodel 132 may be transmitted to computing node 210.
- FIG3 only schematically illustrates the deployment of two sub-models at two computing nodes, respectively.
- the machine learning model may include more sub-models, in which case each sub-model may be deployed at more computing nodes.
- each sub-model may be deployed at each computing node.
- the amount of data for a sub-model is much smaller than that for training data.
- transmitting sub-models instead of training data between multiple computing nodes can greatly reduce the transmission bandwidth and transmission time involved during training, thereby improving the overall performance of the training phase.
- the sub-models to be activated can be known in advance, the sub-models to be activated can be pre-loaded to the computing nodes. In this way, the time overhead of waiting for training data in the existing technical solutions can be further reduced, thereby further improving the efficiency of the training phase.
- FIG. 4 shows a block diagram of the structure of a computing system 400 for training a machine learning model according to some embodiments of the present disclosure.
- the training process can be performed in a computing system 400 as shown in FIG. 4, which may include multiple computing devices 450 and 452.
- Each computing device may include multiple computing nodes, respectively.
- computing device 450 may include computing nodes 210 and 220
- computing device 452 may include computing nodes 460 and 462.
- the computing device may be, for example, a computing device with a central processing unit (CPU) in computing system 400, and the computing node may be, for example, a graphics processing unit (GPU) in each computing device.
- computing devices 450 and 452 may be referred to as a first computing device and a second computing device, respectively.
- Multiple sub-models in a machine learning model can be deployed separately at multiple computing nodes.
- the machine learning model can be implemented based on a hybrid expert system, for example, and the multiple sub-models can be multiple expert models in the hybrid expert system.
- the training process can be performed in the computing system 400 shown in Figure 4.
- multiple computing nodes can be located at the application layer to execute processes related to the training task itself.
- the computing device 450 may include a scheduler 410, which can receive requests from each computing node to obtain a sub-model, and obtain the desired sub-model from a specified location based on the request.
- the scheduler 410 may include an internal scheduler (having a memory 412 for the computing node 210) 414 for the computing node 210, and an internal scheduler (having a memory 416 for the computing node 220) 418 for the computing node 220. Further, the scheduler 410 may include External scheduler 420 (with memory 422 for computing device 450).
- computing device 452 may have a scheduler 430, which may include an internal scheduler 434 (having a memory 432 for computing node 460) and an internal scheduler 438 for computing node 462 (having a memory 436 for computing node 462). Further, scheduler 430 may include an external scheduler 440 (having a memory 442 for computing device 452).
- each scheduler is located at the system layer to manage the process of acquiring sub-models during the training process. Specifically, internal schedulers 414, 418, 434 and 436 are used to perform scheduling tasks within the computing device, and external schedulers 420 and 440 are used to perform scheduling between various computing devices.
- the sub-model 130 can be deployed at the computing node 210, and the sub-model 132 can be deployed at the computing node 220.
- the machine learning model can be iteratively trained in multiple stages. For example, in one training stage, the first set of training data for training the machine learning model can be received at the computing node 210. Since only the sub-model 130 exists locally at the computing node 210, it is necessary to obtain other sub-models to be activated from other computing nodes at this time.
- the gating model in the machine learning model can determine which sub-model will be activated by the training data, and the sub-model to be activated can be pre-acquired at this time.
- the sub-model can be obtained from the computing node with the sub-model to be activated at the start time of each training stage.
- the sub-model 132 can be obtained from the computing node 220. In this way, the waiting delay in the training process can be reduced, thereby improving the performance of the training process.
- the first set of training data herein may include a large amount of training data (e.g., 1024 or more). Although a single training data only activates a small number of sub-models, when the amount of training data is large, the training data will activate almost all sub-models. At this time, the sub-models to be activated can be obtained in advance, thereby improving the overall performance of the training process.
- FIG. 4 only shows a simplified example in which the computing device includes two computing nodes. In an actual application environment, the computing device may include multiple computing nodes. For example, the computing device may include more computing nodes, and the computing device and the GPU may be connected via different communication links.
- FIG. 5 shows a block diagram 500 of a topological structure between a computing device and computing nodes according to some embodiments of the present disclosure.
- the computing device may include a CPU 510 and eight GPUs (i.e., GPUs 524, 526, ..., 534, 536).
- GPUs 524 and 526 may be connected to CPU 510 via a PCIE device 520, and PCIE device 520 may be further connected to other computing devices via a NIC (network interface controller) 522.
- NIC network interface controller
- GPUs 534 and 536 may be connected to CPU 510 via a PCIE device 530, and PCIE device 530 may be further connected to other computing devices via a NIC (network interface controller) 532.
- each GPU may be connected via an NVSwitch (NV switch) device 536.
- NV switch NVSwitch
- connection between two different computing devices via a NIC device may be referred to as a first type of communication link
- the connection between a CPU and a GPU via a PCIE device may be referred to as a second type of communication link
- connection between two GPUs via an NVSwitch device may be referred to as a third type of communication link.
- the three types of communication links may have different transmission speeds, and the transmission speed of the first type of communication link ⁇ the transmission speed of the second type of communication link ⁇ the transmission speed of the third type of communication link.
- the sub-model may be acquired via different types of communication links.
- the computing node 210 may send a request to acquire the target submodel (e.g., the submodel 132) to the scheduler 410, for example, the request may be added to an acquisition queue for processing by the scheduler 410.
- the scheduler 410 may call a scheduler for internal scheduling or a scheduler for external scheduling based on the location of the target submodel.
- Both computing node 210 and computing node 220 are located in the same computing device 450 in computing system 400, and internal scheduler 414 can be called to transfer the submodel from memory 416 of computing node 220 to the computing node 210.
- the memory 412 of the computing node 210 writes the submodel 132. See FIG. 6 for more details of the acquisition process, which shows a block diagram 600 of a process for acquiring a submodel from a computing node located on the same computing device according to some embodiments of the present disclosure. As shown in FIG.
- the submodel 132 is deployed at the computing node 220 (i.e., located in the memory 416 of the computing node 220). As shown by arrow 610 in FIG. 6, the internal scheduler 414 can acquire the submodel 132 from the memory 416 of the computing node 220 and store it in the memory 412 of the computing node 210 to form the submodel 132'.
- FIG6 only shows the case where the sub-model 132 is pre-acquired to the memory 412 of the computing node 210, alternatively and/or additionally, one or more sub-models to be called can be pre-loaded to the memory 412 at the start time of the training phase. In this way, the sub-models to be called can be prepared in advance, thereby reducing the time delay caused by acquiring the sub-models during the training process.
- the capacity of the memory of each computing node is usually limited, so sub-models cannot be loaded into the memory indefinitely.
- the sizes of multiple sub-models in a machine learning model are similar (for example, having a threshold size), and the threshold number of sub-models that can be accommodated by the memory can be determined based on a comparison of the storage capacity of the memory and the threshold size. For example, assuming that the memory capacity is N times the size of the sub-model, the threshold number is N.
- a "credit value" can be set for each memory to indicate the number of sub-models that the current memory can further accommodate. In the initial stage, the credit value can be set to the threshold capacity N of the memory. In the case of loading a sub-model into the memory, the credit value can be reduced by one; in the case of releasing a sub-model from the memory, the credit value can be increased by one.
- the memory before writing a sub-model to the memory, it can be determined based on the credit value whether the memory includes free space. If it is determined that the number of sub-models in the memory 412 of the computing node 210 is lower than the threshold number, then there is free space and the sub-model 132 can be written to the memory 412. In this way, it can be determined in a simple and effective manner whether a sub-model can be written to the memory, thereby avoiding the situation where the writing process overwrites the sub-model being used in the memory.
- the sub-model in the memory that is no longer used can be released.
- the memory 412 of the computing node 210 includes the machine learning model If it is determined that the number of submodels in the memory 412 is equal to the threshold number (that is, the memory 412 is full and can no longer store other submodels), it can be determined whether the existing submodels in the memory 412 have been used up. If it is determined that the update parameters of the third submodel in the memory 412 have been transmitted (that is, the relevant update gradients have been transmitted to the local computing node where the third submodel is located), the third submodel can be released from the memory 412.
- the released space can be used to store the submodel 132, and the submodel 132 can be written to the memory 412.
- the space in the memory can be shared among multiple submodels, thereby improving the utilization rate of the limited memory space.
- the submodel to be called can be continuously pre-acquired, thereby reducing potential waiting delays.
- the first set of training data can be input into the sub-model 130 and the obtained sub-model 132' at the computing node 210, respectively, to determine the first update parameter for updating the sub-model 130 and the second update parameter for updating the sub-model 132.
- the update parameters can be determined based on a variety of model optimization methods currently known and/or to be developed in the future. For example, a loss function can be constructed based on the difference between the label in the training data and the predicted value obtained based on the training data, and then the update gradient caused by the loss function can be determined. At this time, the update gradient of each sub-model can be used as an update parameter to update each sub-model.
- an update operation may be performed at a local computing node corresponding to a submodel.
- submodel 130 is located at computing node 210, and thus submodel 130 may be optimized at computing node 210 using the updated parameters of submodel 130.
- submodel 132 is located at computing node 220, and thus the updated parameters of submodel 132 need to be transmitted to computing node 220, and then submodel 132 is updated at computing node 220.
- updating the parameters only involves updating the gradient and only has a small amount of data, and thus does not cause excessive network burden.
- the transmission process of acquiring the sub-model and transmitting back the updated parameters occupies network bandwidth resources, and the calculation process of determining the updated parameters of the sub-model occupies computing resources.
- the transmission process and the calculation process do not conflict and can be performed in parallel, thereby further improving the efficiency of the training process.
- FIG7 shows a block diagram 700 for comparing multiple training processes according to some embodiments of the present disclosure.
- the upper portion of FIG7 shows a training process of a conventional technical solution
- the lower portion of FIG7 shows a training process according to an exemplary implementation of the present disclosure.
- the transmission process 710 for acquiring training data the calculation process 712 for determining update parameters
- the transmission process 714 for transmitting back the update parameters there is a strong timing relationship between the transmission process 710 for acquiring training data, the calculation process 712 for determining update parameters, and the transmission process 714 for transmitting back the update parameters, that is, the above processes can only be executed serially, which results in a large waiting delay at each computing node.
- the transmission process 720 of sub-model A and the transmission process 722 of sub-model B can be executed.
- the calculation process 730 of determining the updated parameters of sub-model A and the calculation process 732 of determining the updated parameters of sub-model B can be executed. In this way, the parallelism of the transmission process and the calculation process at the computing node can be greatly improved, thereby improving the overall performance of the training process.
- Figure 8A shows a block diagram 800A of the timing of transmitting sub-models between multiple computing nodes according to some embodiments of the present disclosure.
- the left side of Figure 8A shows four computing nodes in the computing device (represented as computing nodes 0, 1, 2, and 3, respectively), and the right side of Figure 8A shows the time overhead of transmitting sub-models between multiple computing nodes.
- the numbers in the right boxes represent the numbers of the computing nodes where the sub-models are located.
- box 810 represents the time when computing node 0 reads the sub-models from computing node 1.
- box 812 represents the time cost of computing node 1 reading the sub-model from computing node 1
- box 814 represents the time cost of computing node 2 reading the sub-model from computing node
- box 816 represents the time cost of computing node 3 reading the sub-model from computing node 0. Since computing nodes 1 to 3 read the sub-model in computing node 0 at the same time, this causes contention when accessing computing node 0, and the time cost of boxes 812, 814 and 816 increases and is higher than the time cost of box 810 (in the absence of contention).
- the situation where sub-models are read from the memory of the same computing node at the same time can be avoided as much as possible.
- the multiple computing nodes can be sorted and read in sequence. In this way, the problem of multiple computing nodes competing for the data access interface of the memory during the reading process can be avoided.
- the sub-model 132 is located in the computing node 220 in the computing device 450. If the third computing node in the computing device 450 also requests to obtain the sub-model 132, if a request to read the sub-model 132 is received from the third computing node, the order in which the sub-model 132 is read by the computing node 210 and the third computing node, respectively, can be determined. For example, the computing node 210 can be allowed to read first, and then the third computing node can be allowed to read. At this time, the sub-model 132 can be read by the computing node 210 based on the above order, so as to write the read sub-model to the memory 412 of the computing node 210. Then, the sub-model 132 can be read by the third computing node, so as to write the read sub-model to the memory of the third computing node.
- FIG. 8B shows a block diagram 800B of the timing of transmitting sub-models between multiple computing nodes according to some embodiments of the present disclosure.
- computing node 0 can read the sub-model in computing node 1.
- computing node 1 can read the sub-model in computing node 2 at box 822; computing node 2 can read the sub-model in computing node 3 at box 824; and computing node 3 can read the sub-model in computing node 0 at box 826.
- each read operation can be performed independently without contention, so This can further reduce the time overhead of the training phase.
- FIG. 9 shows a block diagram 900 of a process for obtaining a sub-model from a computing node located in a different computing device according to some embodiments of the present disclosure.
- a computing node 210 in a computing device 450 may issue a request to a scheduler 410 to obtain a sub-model 910 in a memory 432 of a computing node 460 in another computing device 452.
- the scheduler 410 may call an external scheduler 420 to obtain the sub-model 910 from the computing device 452 and store it in the memory 412.
- the external scheduler 440 in the computing device 452 may read the sub-model 910 from the memory 432 via the second type of link 924 and store it in the memory 442 so as to be read by the external scheduler 420.
- the external scheduler 420 in the computing device 450 may obtain the sub-model 910 from the computing device 452 to the computing device 450 via the first type of communication link 922 between the computing device 450 and the computing device 452.
- the read sub-model 910 may be written to the memory 412 via the second type of link 920 to form the sub-model 910'.
- the multiple schedulers work together to read the sub-model from the memory of the computing node located in different computing devices.
- each computing node in computing device 450 may need a large number of sub-models from computing device 452.
- multiple sub-models can be pre-acquired from computing device 452 at the beginning of each training phase.
- different types of communication links in the computing system have different speeds, and communication links with higher transmission speeds can be preferentially utilized. See Figures 10A and 10B for a block diagram of the process of acquiring multiple sub-models from different computing devices.
- FIG10A shows a block diagram 1000A of the first stage of the process of acquiring multiple sub-models from different computing devices according to some embodiments of the present disclosure.
- the current computing device includes a CPU 610, GPUs 624 and 626 (connected to the CPU 610 via a PCIE device 620).
- both GPUs 624 and 626 want to acquire sub-models 1010, 1012, 1014, and 1016 from another computing device
- multiple sub-models can be acquired from the other computing device via a first type of communication link between the current computing device and the other computing device.
- the plurality of sub-models 1010 , 1012 , 1014 , and 1016 are obtained, they may be stored in the CPU 610 .
- GPU 624 can read sub-models 1010, 1012, 1014, and 1016 using the second type of communication link (via PCIE device 620) and store them locally in GPU 624.
- GPU 626 can read sub-models 1010, 1012, 1014, and 1016 using the second type of communication link (via PCIE device 620) and store them locally in GPU 626.
- the transmission speed of PCIE device 620 is not satisfactory, and when transmitting a large number of sub-models, there will be a bandwidth shortage problem, which will lead to a longer waiting time.
- a third type of communication link between two GPUs can be utilized to improve the efficiency of acquiring sub-models.
- multiple sub-models 1010, 1012, 1014, and 1016 can be divided into two groups: for example, the first group includes sub-models 1010 and 1012, and the second group includes sub-models 1014 and 1016.
- the sub-models of the first group can be transmitted from CPU 610 to GPU 624 so that sub-models 1010' and 1012' (that is, copies of sub-models 1010 and 1012) are stored in GPU 624.
- the sub-models of the second group can be transmitted from CPU 610 to GPU 626 so that sub-models 1014' and 1016' (that is, copies of sub-models 1014 and 1016) are stored in GPU 626.
- Figure 10B shows a block diagram 1000B of the second stage of the process of obtaining multiple sub-models from different computing devices according to some embodiments of the present disclosure.
- a third type of communication link between GPUs 624 and 626 e.g., via NVSwitch device 636) can be used to transfer sub-models between GPUs 624 and 626.
- sub-models 1014' and 1016' can be transferred from GPU 626 to GPU 624 via NVSwitch device 636 to form sub-models 1014" and 1016".
- sub-models 1010' and 1012' can be transferred from GPU 624 to GPU 626 via NVSwitch device 636 to form sub-models 1010" and 1012".
- NVSwitch device 636 to form sub-models 1010" and 1012.
- GPUs 624 and 626 will have all the desired sub-models.
- the transmission speed of the third type of communication link is much higher than the transmission speed of the second type of communication link.
- the submodel is acquired using a communication link with a faster transmission speed. Assume that the transmission speed of the third type of communication link is 1000 times (or other multiples) of the transmission speed of the second type of communication link, and the time for transmitting a submodel from the CPU to the GPU is 1 second (or other time length). In the conventional case where the submodel is transmitted directly from the CPU to the two GPUs 624 and 626, 8 submodels need to be transmitted and the time cost is 8 seconds. When the method described above is adopted, only 4 submodels need to be transmitted from the CPU to the GPU, and the corresponding time cost is 4 seconds.
- the computing device may further include a third computing node, and the third sub-model may be deployed at the third computing node. In this case, a similar training process may be performed at the third node.
- a third set of training data for training the machine learning model may be received.
- the third set of training data may be different from the first set of training data.
- the second sub-model may be acquired from the second computing node.
- the third set of training data may be input into the first sub-model and the acquired second sub-model, respectively, to determine an update parameter (e.g., referred to as a third update parameter) for updating the first sub-model and an update parameter (e.g., referred to as a fourth update parameter) for updating the second sub-model.
- the fourth update parameter may be transmitted to the local computing node (i.e., the second computing node) of the second sub-model.
- the process of transmitting the update parameters may involve transmitting the update parameters to the computing node located in the same computing device, and transmitting the update parameters to the computing node located in a different computing device.
- the process of transmitting the update parameters of the sub-model is the reverse process of the process of obtaining the sub-model described above, and the internal scheduler and/or the external scheduler may be called in a similar manner, respectively, and the update parameters are transmitted via the first, second and/or third type of communication link.
- a combined update parameter for updating the second sub-model can be determined based on the second update parameter and the fourth update parameter. For example, an average value of two update parameters can be determined and the average value can be transmitted to the second computing node.
- the computing device includes 8 GPUs
- 8 update parameters can be determined at the 8 GPUs respectively, and then the 8 update parameters need to be transmitted back to the local node of the sub-model.
- the second computing node can optimize the second sub-model based on the average value of the update gradients determined at the 8 computing nodes. In this way, the transmission overhead related to the gradient transmission can be reduced to 1/8 of the original, thereby further reducing the invalid transmission overhead of the training process, thereby improving the overall performance of the training process.
- a similar process can be performed at each computing node.
- the second set of training data at the second computing node needs to call the first sub-model
- a second set of training data for training the machine learning model can be received, and the first sub-model can be obtained from the first computing node.
- the second set of training data can be input into the acquired first sub-model and second sub-model, respectively, to determine the update parameters (e.g., referred to as the fifth update parameters) for updating the first sub-model and the update parameters (e.g., referred to as the sixth update parameters) for updating the second sub-model.
- the sixth update parameter can be transmitted to the local first computing node of the first sub-model.
- the sub-models can be updated at the local computing nodes where the sub-models are located. Specifically, the first sub-model can be updated at the first computing node using the first update parameters, and the second sub-model can be updated at the second computing node using the second update parameters. It will be understood that the sub-models can be updated based on a variety of update methods currently known and/or to be developed in the future. For example, in the case where the update parameters involve updating the gradient, the parameters of the sub-models can be updated along the direction of the update gradient based on a predetermined step size.
- the machine learning model can be iteratively trained in multiple stages based on the process described above.
- the training stop condition can be predefined, for example, when reaching Training can be stopped at a predetermined number of iterations, training can be stopped when a threshold convergence condition is reached, and so on.
- the proposed “data-centric” technical solution can greatly reduce the amount of data to be transmitted compared to the existing “expert-centric” technical solution.
- the data transmission volume of the two training processes will be compared by using specific formulas.
- the machine learning model can be implemented based on a hybrid expert system, and each submodule can be implemented using a feedforward network (FFN) model.
- FFN feedforward network
- Each FFN model can include two linear layers, the first linear layer can involve a dimension of H*4H, and the second linear layer can involve a dimension of 4H*H, in which case the dimension of the FFN model is 8H 2 .
- each computing node includes E sub-models, each computing device has mE sub-models.
- the position of the sub-model remains fixed and the training data is transmitted. Assuming that each computing node generates T training data, a computing device including m computing nodes will generate mT training data. Assuming that the training data is evenly distributed, The training data will be transmitted to other computing devices. At this time, the communication volume for transmitting training data can be expressed as:
- the ratio of the data transmission involved in the two training processes can be determined as:
- the process for training a machine learning model has been described above. Using the above process, the efficiency of the training process can be improved in many aspects.
- the above process supports fine-grained asynchronous communication. In other words, the process of transmitting a sub-model and the process of calculating and updating parameters can be executed in parallel at the granularity of the sub-model.
- various types of communication links support hierarchical communication, and sub-models located in computing nodes of other computing devices can be pre-pulled to the current computing device so that the sub-model can be shared via high-speed communication links between multiple computing nodes of the current computing device.
- the required sub-models can be pre-acquired at the start time point of each training stage.
- the machine learning model includes a first sub-model and a second sub-model, the first sub-model is located at a first computing node in a computing system, and the second sub-model is located at a second computing node in the computing system.
- a first set of training data for training the machine learning model is received; at box 1120, a second sub-model is obtained from the second computing node; at box 1130, the first set of training data is input into the first sub-model and the obtained second sub-model, respectively, to determine a first update parameter for updating the first sub-model and a second update parameter for updating the second sub-model; and at box 1140, the second update parameter is transmitted to the second computing node. number.
- obtaining the second sub-model includes: obtaining the second sub-model from the second computing node at a starting time point of a training phase for training a machine learning model.
- obtaining the second submodel includes: in response to determining that both the first computing node and the second computing node are located in a first computing device in a computing system, writing the second submodel from a memory of the second computing node to a memory of the first computing node.
- writing the second sub-model to the memory of the first computing node includes: determining a threshold number of sub-models that the memory of the first computing node can accommodate based on the memory capacity of the memory of the first computing node and the size of the second sub-model; and in response to determining that the number of sub-models in the memory of the first computing node is lower than the threshold number, writing the second sub-model to the memory of the first computing node.
- the memory of the first computing node includes a third sub-model of the machine learning model
- the method further includes: in response to determining that the number of sub-models in the memory of the first computing node is equal to a threshold number, in response to determining that the third update parameter of the third sub-model in the memory of the first computing node has been transmitted, releasing the third sub-model from the memory of the first computing node; and writing the second sub-model to the memory of the first computing node.
- the first computing device further includes a third computing node
- writing the second sub-model to the memory of the first computing node further includes: in response to receiving a request to read the second sub-model from the third computing node, determining the order in which the second sub-model is read by the first computing node and the third computing node respectively; and reading the second sub-model by the first computing node and the third computing node respectively based on the order so as to write the second sub-model to the memory of the first computing node and the memory of the third computing node.
- obtaining the second sub-model further includes: in response to determining that the first computing node and the second computing node are respectively located in a first computing device and a second computing device in the computing system, The second submodel is written from the memory of the second computing device to the memory of the first computing device via a first type of communication link between the first computing device and the first computing node; and the second submodel is written from the memory of the first computing device to the memory of the first computing node via a second type of communication link between the first computing device and the first computing node.
- the first computing device further includes a third computing node
- the method further includes: in response to a request from the third computing node, writing the second sub-model from the memory of the first computing device to the memory of the third computing node via a second type of communication link between the first computing device and the third computing node; and writing the second sub-model from the memory of the third computing node to the memory of the first computing node via a third type of communication link between the first computing node and the third computing node.
- the first computing node, the second computing node, and the third computing node are graphics processing units.
- a speed of the second type of communication link is lower than a speed of the third type of communication link.
- the method 1100 further includes: receiving a second set of training data for training a machine learning model at a second computing node; acquiring a first sub-model from a first computing node; inputting the second set of training data into the acquired first sub-model and second sub-model, respectively, to determine a fifth update parameter for updating the first sub-model and a sixth update parameter for updating the second sub-model; and transmitting the sixth update parameter to the first computing node.
- the method 1100 further includes: receiving a third set of training data for training a machine learning model at a third computing node of the first computing device; obtaining a second sub-model from the second computing node; inputting the third set of training data into the first sub-model and the obtained second sub-model, respectively, to determine a third update parameter for updating the first sub-model and a fourth update parameter for updating the second sub-model; and transmitting the fourth update parameter to the second computing node.
- transmitting the second update parameter and the fourth update parameter to the second computing node further includes: determining a combined update parameter for updating the second sub-model based on the second update parameter and the fourth update parameter; and transmitting the second update parameter to the second computing node. Transmit combined update parameters.
- the machine learning model is implemented based on a hybrid expert system, and the first sub-model and the second sub-model are respectively the first expert model and the second expert model in the hybrid expert system.
- the method 1100 further includes: updating the first sub-model using the first update parameter at the first computing node, and updating the second sub-model using the second update parameter at the second computing node.
- FIG12 shows a block diagram of an apparatus 1200 for training a machine learning model according to some implementations of the present disclosure.
- the machine learning model includes a first sub-model and a second sub-model, the first sub-model is located at a first computing node in a computing system, and the second sub-model is located at a second computing node in the computing system.
- the apparatus 1200 includes: a receiving module 1210 configured to receive a first set of training data for training the machine learning model at the first computing node; an acquisition module 1220 configured to acquire the second sub-model from the second computing node; a determination module 1230 configured to input the first set of training data to the first sub-model and the acquired second sub-model, respectively, to determine a first update parameter for updating the first sub-model and a second update parameter for updating the second sub-model; and a transmission module 1240 configured to transmit the second update parameter to the second computing node.
- a receiving module 1210 configured to receive a first set of training data for training the machine learning model at the first computing node
- an acquisition module 1220 configured to acquire the second sub-model from the second computing node
- a determination module 1230 configured to input the first set of training data to the first sub-model and the acquired second sub-model, respectively, to determine a first update parameter for updating the first sub-model and a second update parameter for updating the second sub-model
- a transmission module 1240
- the acquisition module 1220 includes: an initialization module configured to acquire the second sub-model from the second computing node at a starting time point of the training phase.
- the acquisition module 1220 includes: a writing module configured to write the second sub-model from the memory of the second computing node to the memory of the first computing node in response to determining that both the first computing node and the second computing node are located in the first computing device in the computing system.
- the writing module includes: a threshold determination module configured to determine a threshold number of sub-models that can be accommodated by the memory of the first computing node based on the memory capacity of the memory of the first computing node and the size of the second sub-model; and a comparison module configured to write the second sub-model to the memory of the first computing node in response to determining that the number of sub-models in the memory of the first computing node is below a threshold number.
- the memory of the first computing node includes a third sub-model of the machine learning model
- the device further includes: a release module, configured to release the third sub-model from the memory of the first computing node in response to determining that the number of sub-models in the memory of the first computing node is equal to a threshold number, and in response to determining that the third update parameter of the third sub-model in the memory of the first computing node has been transmitted; and a sub-model writing module, configured to write the second sub-model to the memory of the first computing node.
- the first computing device further includes a third computing node
- the write module further includes: an order determination module, configured to determine the order in which the second sub-model is read by the first computing node and the third computing node respectively in response to receiving a request to read the second sub-model from the third computing node; and an order-based write module, configured to read the second sub-model by the first computing node and the third computing node respectively based on the order, so as to write the second sub-model to the memory of the first computing node and the memory of the third computing node.
- the acquisition module 1220 further includes: a first writing module, configured to, in response to determining that the first computing node and the second computing node are respectively located in the first computing device and the second computing device in the computing system, write the second sub-model from the memory of the second computing device to the memory of the first computing device via a first type of communication link between the first computing device and the second computing device; and a second writing module, configured to write the second sub-model from the memory of the first computing device to the memory of the first computing node via a second type of communication link between the first computing device and the first computing node.
- a first writing module configured to, in response to determining that the first computing node and the second computing node are respectively located in the first computing device and the second computing device in the computing system, write the second sub-model from the memory of the second computing device to the memory of the first computing device via a first type of communication link between the first computing device and the second computing device
- a second writing module configured to write the second sub-model from the memory of the first computing device to
- the first computing device further includes a third computing node
- the second writing module is further configured to: in response to a request from the third computing node, write the second submodel from the memory of the first computing device to the memory of the third computing node via a second type of communication link between the first computing device and the third computing node; and the third writing module is configured to write the second submodel from the memory of the first computing device to the memory of the third computing node via the first computing node and the third computing node.
- the third type of communication link between the three computing nodes writes the second sub-model from the memory of the third computing node to the memory of the first computing node.
- the first computing node, the second computing node, and the third computing node are graphics processing units.
- a speed of the second type of communication link is lower than a speed of the third type of communication link.
- the receiving module 1210 is further configured to receive a second set of training data for training the machine learning model in the training phase and at the second computing node;
- the acquisition module 1220 is further configured to acquire the first sub-model from the first computing node;
- the determination module 1230 is further configured to input the second set of training data to the acquired first sub-model and the second sub-model, respectively, to determine a fifth update parameter for updating the first sub-model and a sixth update parameter for updating the second sub-model;
- the transmission module 1240 is further configured to transmit the sixth update parameter to the first computing node.
- the receiving module 1210 is further configured to receive a third set of training data for training the machine learning model in the training phase and at a third computing node of the first computing device;
- the acquisition module 1220 is further configured to acquire a second sub-model from the second computing node;
- the determination module 1230 is further configured to input the third set of training data to the first sub-model and the acquired second sub-model, respectively, to determine a third update parameter for updating the first sub-model and a fourth update parameter for updating the second sub-model;
- the transmission module 1240 is further configured to transmit the fourth update parameter to the second computing node.
- the transmission module 1240 further includes: a combination module, configured to determine a combined update parameter for updating the second sub-model based on the second update parameter and the fourth update parameter; and a combined parameter transmission module, configured to transmit the combined update parameter to the second computing node.
- the machine learning model is implemented based on a hybrid expert system, and the first sub-model and the second sub-model are respectively the first expert model and the second expert model in the hybrid expert system.
- the apparatus 1200 further includes: an updating module configured to update the first sub-model at the first computing node using the first updating parameter, and to update the second sub-model at the second computing node using the second updating parameter.
- Fig. 13 shows a block diagram of an electronic device 1300 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 1300 shown in Fig. 13 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein.
- the electronic device 1300 is in the form of a general-purpose computing device.
- the components of the electronic device 1300 may include, but are not limited to, one or more processors or processing units 1310, a memory 1320, a storage device 1330, one or more communication units 1340, one or more input devices 1350, and one or more output devices 1360.
- the processing unit 1310 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 1320. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 1300.
- the electronic device 1300 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 1300, including but not limited to volatile and non-volatile media, removable and non-removable media.
- the memory 1320 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof.
- the storage device 1330 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and/or data (e.g., training samples for training) and may be accessed within the electronic device 1300.
- a machine-readable medium such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and/or data (e.g., training samples for training) and may be accessed within the electronic device 1300.
- the electronic device 1300 may further include additional removable/non-removable, volatile/non-volatile storage media.
- a disk drive for reading or writing from a removable, non-volatile disk e.g., a “floppy disk”
- an optical drive for reading or writing from a removable, non-volatile optical disk may be provided.
- each drive may be connected to the bus (not shown) by one or more data media interfaces.
- the memory 1320 may include a computer program product 1325 having one or more programs. Modules, these program modules are configured to execute various methods or actions of various embodiments of the present disclosure.
- the communication unit 1340 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 1300 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 1300 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
- PC network personal computer
- the input device 1350 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc.
- the output device 1360 may be one or more output devices, such as a display, a speaker, a printer, etc.
- the electronic device 1300 may also communicate with one or more external devices (not shown) through the communication unit 1340 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 1300, or communicate with any device that allows the electronic device 1300 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).
- I/O input/output
- a computer-readable storage medium on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above.
- a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
- These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that, when these instructions are executed by the processing unit of the computer or other programmable data processing device, generates functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- These computer-readable program instructions may also be stored in a computer-readable storage medium, which enables a computer, a programmable data processing device and/or other device to work in a specific manner, so that a computer-readable medium storing instructions includes a product of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
- each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification.
- the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved.
- each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
CommDC=8H2Em(n-1)
公式1
Claims (18)
- 一种用于训练机器学习模型的方法,所述机器学习模型包括第一子模型和第二子模型,所述第一子模型位于计算系统中的第一计算节点,并且所述第二子模型位于所述计算系统中的第二计算节点,所述方法包括:在所述第一计算节点处,接收用于训练所述机器学习模型的第一组训练数据;从所述第二计算节点获取所述第二子模型;分别向所述第一子模型和获取的所述第二子模型输入所述第一组训练数据,以确定用于更新所述第一子模型的第一更新参数和用于更新所述第二子模型的第二更新参数;以及向所述第二计算节点传输所述第二更新参数。
- 根据权利要求1的所述方法,其中获取所述第二子模型包括:在用于训练所述机器学习模型的训练阶段的开始时间点,从所述第二计算节点获取所述第二子模型。
- 根据权利要求1或2的所述方法,其中获取所述第二子模型包括:响应于确定所述第一计算节点和所述第二计算节点两者位于所述计算系统中的第一计算设备,从所述第二计算节点的存储器向所述第一计算节点的存储器写入所述第二子模型。
- 根据权利要求3的所述方法,其中向所述第一计算节点的所述存储器写入所述第二子模型包括:基于所述第一计算节点的所述存储器的存储器容量和所述第二子模型的大小,确定所述第一计算节点的所述存储器可容纳的子模型的阈值数量;以及响应于确定所述第一计算节点的所述存储器中的子模型的数量低于所述阈值数量,向所述第一计算节点的所述存储器写入所述第二子模型。
- 根据权利要求4的所述方法,其中所述第一计算节点的所述 存储器包括所述机器学习模型的第三子模型,所述方法进一步包括:响应于确定所述第一计算节点的所述存储器中的子模型的所述数量等于所述阈值数量,响应于确定所述第一计算节点的所述存储器中的所述第三子模型的第三更新参数已经被传输,从所述第一计算节点的所述存储器释放所述第三子模型;以及向所述第一计算节点的所述存储器写入所述第二子模型。
- 根据权利要求4的所述方法,其中所述第一计算设备进一步包括第三计算节点,以及向第一计算节点的所述存储器写入所述第二子模型进一步包括:响应于接收到来自所述第三计算节点的读取所述第二子模型的请求,确定分别由所述第一计算节点和所述第三计算节点读取所述第二子模型的顺序;以及基于所述顺序来分别由所述第一计算节点和所述第三计算节点读取所述第二子模型,以便向所述第一计算节点的所述存储器和所述第三计算节点的所述存储器的写入所述第二子模型。
- 根据权利要求3的所述方法,其中获取所述第二子模型进一步包括:响应于确定所述第一计算节点和所述第二计算节点分别位于所述计算系统中的所述第一计算设备和第二计算设备,经由所述第一计算设备和所述第二计算设备之间的第一类型的通信链路,从所述第二计算设备的存储器向所述第一计算设备的存储器写入所述第二子模型;以及经由所述第一计算设备和所述第一计算节点之间的第二类型的通信链路,从所述第一计算设备的所述存储器向所述第一计算节点的所述存储器写入所述第二子模型。
- 根据权利要求7的所述方法,其中所述第一计算设备进一步包括第三计算节点,以及所述方法进一步包括:响应于来自所述第三计算节点的请求,经由所述第一计算设备和所述第三计算节点之间的第二类型的通信链路,从所述第一计算设备 的所述存储器向所述第三计算节点的所述存储器写入所述第二子模型;以及经由所述第一计算节点和所述第三计算节点之间的第三类型的通信链路,从所述第三计算节点的所述存储器向所述第一计算节点的所述存储器写入所述第二子模型。
- 根据权利要求8的所述方法,其中所述第一计算节点、所述第二计算节点和所述第三计算节点是图形处理单元。
- 根据权利要求8的所述方法,其中所述第二类型的通信链路的速度低于所述第三类型的通信链路的速度。
- 根据权利要求1或2的所述方法,进一步包括:在所述第一计算设备的第三计算节点处,接收用于训练所述机器学习模型的第三组训练数据;从所述第二计算节点获取所述第二子模型;分别向所述第一子模型和获取的所述第二子模型输入所述第三组训练数据,以确定用于更新所述第一子模型的第三更新参数和用于更新所述第二子模型的第四更新参数;以及向所述第二计算节点传输所述第四更新参数。
- 根据权利要求11的所述方法,其中向所述第二计算节点传输所述第二更新参数和所述第四更新参数进一步包括:基于所述第二更新参数和所述第四更新参数,确定用于更新所述第二子模型的组合更新参数;以及向所述第二计算节点传输所述组合更新参数。
- 根据权利要求1或2的所述方法,进一步包括:在所述第二计算节点处,接收用于训练所述机器学习模型的第二组训练数据;从所述第一计算节点获取所述第一子模型;分别向获取的所述第一子模型和所述第二子模型输入所述第二组训练数据,以确定用于更新所述第一子模型的第五更新参数和用于更新所述第二子模型的第六更新参数;以及向所述第一计算节点传输所述第六更新参数。
- 根据权利要求1或2的所述方法,其中所述机器学习模型是基于混合专家系统实现的,并且所述第一子模型和所述第二子模型分别是所述混合专家系统中的第一专家模型和第二专家模型。
- 根据权利要求1或2的所述方法,进一步包括:在所述第一计算节点处利用所述第一更新参数更新所述第一子模型,以及在所述第二计算节点处利用所述第二更新参数更新所述第二子模型。
- 一种用于训练机器学习模型的装置,所述机器学习模型包括第一子模型和第二子模型,所述第一子模型位于计算系统中的第一计算节点,并且所述第二子模型位于所述计算系统中的第二计算节点,所述装置包括:接收模块,被配置用于在所述第一计算节点处,接收用于训练所述机器学习模型的第一组训练数据;获取模块,被配置用于从所述第二计算节点获取所述第二子模型;确定模块,被配置用于分别向所述第一子模型和获取的所述第二子模型输入所述第一组训练数据,以确定用于更新所述第一子模型的第一更新参数和用于更新所述第二子模型的第二更新参数;以及传输模块,被配置用于向所述第二计算节点传输所述第二更新参数。
- 一种电子设备,包括:至少一个处理单元;以及至少一个存储器,所述至少一个存储器被耦合到所述至少一个处理单元并且存储用于由所述至少一个处理单元执行的指令,所述指令在由所述至少一个处理单元执行时使所述设备执行根据权利要求1至15中任一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现根据权利要求1至15中任一项所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/876,476 US20250371339A1 (en) | 2022-10-30 | 2023-09-21 | Method, apparatus, device, and medium for training a machine learning model |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211341102.0A CN115618966A (zh) | 2022-10-30 | 2022-10-30 | 用于训练机器学习模型的方法、装置、设备和介质 |
| CN202211341102.0 | 2022-10-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024093573A1 true WO2024093573A1 (zh) | 2024-05-10 |
Family
ID=84875648
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/120501 Ceased WO2024093573A1 (zh) | 2022-10-30 | 2023-09-21 | 用于训练机器学习模型的方法、装置、设备和介质 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20250371339A1 (zh) |
| CN (1) | CN115618966A (zh) |
| WO (1) | WO2024093573A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115618966A (zh) * | 2022-10-30 | 2023-01-17 | 抖音视界有限公司 | 用于训练机器学习模型的方法、装置、设备和介质 |
| CN116366468A (zh) * | 2023-02-21 | 2023-06-30 | 天津大学 | 一种基于层次化通信的高效混合专家模型及方法 |
| CN116185629B (zh) * | 2023-02-22 | 2026-04-14 | 之江实验室 | 一种任务执行的方法、装置、存储介质及电子设备 |
| CN121072682A (zh) * | 2024-06-05 | 2025-12-05 | 华为云计算技术有限公司 | 一种模型训练方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112052942A (zh) * | 2020-09-18 | 2020-12-08 | 支付宝(杭州)信息技术有限公司 | 神经网络模型训练方法、装置及系统 |
| CN112183757A (zh) * | 2019-07-04 | 2021-01-05 | 创新先进技术有限公司 | 模型训练方法、装置及系统 |
| CN112418446A (zh) * | 2020-11-18 | 2021-02-26 | 脸萌有限公司 | 模型处理方法、系统、装置、介质及电子设备 |
| CN114723069A (zh) * | 2022-04-15 | 2022-07-08 | 支付宝(杭州)信息技术有限公司 | 参数更新方法、装置和电子设备 |
| CN115618966A (zh) * | 2022-10-30 | 2023-01-17 | 抖音视界有限公司 | 用于训练机器学习模型的方法、装置、设备和介质 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107025205B (zh) * | 2016-01-30 | 2021-06-22 | 华为技术有限公司 | 一种分布式系统中的训练模型的方法及设备 |
| US11604984B2 (en) * | 2019-11-18 | 2023-03-14 | Shanghai United Imaging Intelligence Co., Ltd. | Systems and methods for machine learning based modeling |
| CN111126618B (zh) * | 2019-12-05 | 2023-08-04 | 深圳前海微众银行股份有限公司 | 一种基于多源异构系统的联邦学习方法及装置 |
| US20210357800A1 (en) * | 2020-05-13 | 2021-11-18 | Seagate Technology Llc | Distributed decentralized machine learning model training |
| CN112261137B (zh) * | 2020-10-22 | 2022-06-14 | 无锡禹空间智能科技有限公司 | 基于联合学习的模型训练方法及系统 |
| CN113159327B (zh) * | 2021-03-25 | 2024-04-09 | 深圳前海微众银行股份有限公司 | 基于联邦学习系统的模型训练方法、装置、电子设备 |
| CN113570027B (zh) * | 2021-06-24 | 2025-06-20 | 华为技术有限公司 | 用于生成神经网络模型的方法、装置、系统、设备、介质和程序产品 |
-
2022
- 2022-10-30 CN CN202211341102.0A patent/CN115618966A/zh active Pending
-
2023
- 2023-09-21 US US18/876,476 patent/US20250371339A1/en active Pending
- 2023-09-21 WO PCT/CN2023/120501 patent/WO2024093573A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112183757A (zh) * | 2019-07-04 | 2021-01-05 | 创新先进技术有限公司 | 模型训练方法、装置及系统 |
| CN112052942A (zh) * | 2020-09-18 | 2020-12-08 | 支付宝(杭州)信息技术有限公司 | 神经网络模型训练方法、装置及系统 |
| CN112418446A (zh) * | 2020-11-18 | 2021-02-26 | 脸萌有限公司 | 模型处理方法、系统、装置、介质及电子设备 |
| CN114723069A (zh) * | 2022-04-15 | 2022-07-08 | 支付宝(杭州)信息技术有限公司 | 参数更新方法、装置和电子设备 |
| CN115618966A (zh) * | 2022-10-30 | 2023-01-17 | 抖音视界有限公司 | 用于训练机器学习模型的方法、装置、设备和介质 |
Non-Patent Citations (1)
| Title |
|---|
| JUNCAI LIU, JESSIE HUI WANG, YIMIN JIANG: "Janus: A Unified Distributed Training Framework for Sparse Mixture-of-Experts Models", ACM SIGCOMM, 14 September 2023 (2023-09-14), pages 486 - 498, XP093150976 * |
Also Published As
| Publication number | Publication date |
|---|---|
| US20250371339A1 (en) | 2025-12-04 |
| CN115618966A (zh) | 2023-01-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2024093573A1 (zh) | 用于训练机器学习模型的方法、装置、设备和介质 | |
| US12430170B2 (en) | Quantum computing service with quality of service (QoS) enforcement via out-of-band prioritization of quantum tasks | |
| US20090138624A1 (en) | Storage system and method | |
| US20110265093A1 (en) | Computer System and Program Product | |
| CN109766168B (zh) | 任务调度方法和装置、存储介质以及计算设备 | |
| CN105786603A (zh) | 一种基于分布式的高并发业务处理系统及方法 | |
| KR102824648B1 (ko) | 가속기, 가속기의 동작 방법 및 이를 포함한 전자 장치 | |
| CN115244514A (zh) | 专用处理单元的功能即服务(faas)模型 | |
| JP2023544911A (ja) | 並列量子コンピューティングのための方法及び装置 | |
| WO2024217506A1 (zh) | 内存复用方法、内存复用装置、设备和存储介质 | |
| US11481250B2 (en) | Cooperative workgroup scheduling and context prefetching based on predicted modification of signal values | |
| CN115617474A (zh) | 一种面向边缘计算的启动时间感知的依赖任务调度方法 | |
| Cannella et al. | Adaptivity support for MPSoCs based on process migration in polyhedral process networks | |
| US20220067872A1 (en) | Graphics processing unit including delegator and operating method thereof | |
| CN114116220A (zh) | 一种gpu共享控制方法、gpu共享控制装置及存储介质 | |
| CN112948136A (zh) | 一种嵌入式操作系统异步日志记录的实现方法 | |
| CN114741166B (zh) | 一种分布式任务的处理方法、分布式系统及第一设备 | |
| CN116775124A (zh) | 数据处理方法、装置、计算设备及存储介质 | |
| JP5540799B2 (ja) | データ入出力制御方法,データ入出力制御プログラムおよびデータ入出力制御装置 | |
| CN119484497B (zh) | 反向代理系统事件调度的方法、计算机装置、介质、产品 | |
| CN111858095A (zh) | 一种硬件队列多线程共享方法、装置、设备及存储介质 | |
| CN113542146B (zh) | 报文的限速方法、相关设备以及存储介质 | |
| CN120821580B (zh) | 应用于gpu的任务处理方法、gpu、设备及存储介质 | |
| CN116302620B (zh) | 一种支持乱序回写和并行化的命令通道 | |
| JPWO2007088582A1 (ja) | 共有メモリ型マルチプロセッサにおける非同期遠隔手続き呼び出し方法、非同期遠隔手続き呼び出しプログラムおよび記録媒体 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23884505 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18876476 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 14/08/2025) |
|
| WWP | Wipo information: published in national office |
Ref document number: 18876476 Country of ref document: US |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23884505 Country of ref document: EP Kind code of ref document: A1 |