Apparatus and method for distributed model training, device, and computer readable storage medium
Abstract
The present disclosure discloses an apparatus and method for distributedly training a model, an electronic device, and a computer readable storage medium. The apparatus may include: a distributed reader, a distributed trainer and a distributed parameter server that are mutually independent. A reader in the distributed reader is configured to acquire a training sample, and load the acquired training sample to a corresponding trainer in the distributed trainer; the trainer in the distributed trainer is configured to perform model training based on the loaded training sample to obtain gradient information; and a parameter server in the distributed parameter server is configured to update a parameter of an initial model based on the gradient information of the distributed trainer to obtain a trained target model.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 16 · Forward citations: 0.
Claims (8)
- Claim 1Independent Claim
An apparatus for distributed training of a model, the apparatus comprising a distributed reader, a distributed trainer, and a distributed parameter server that are mutually independent, wherein: a reader in the distributed reader is configured to acquire a training sample, and load the acquired training sample to a corresponding trainer in the distributed trainer; the trainer in the distributed trainer is configured to perform model training based on the loaded training sample to obtain gradient information, wherein the distributed trainer comprises a plurality of trainers, and in a model training process, computing powers of the plurality of trainers match loads of the plurality of trainers by adjusting the computing powers of the plurality of trainers based on a load balancing strategy, wherein the plurality of trainers are all in a status of full load by matching the computing powers of the plurality of trainers; a parameter server in the distributed parameter server is configured t
- Claim 2Depends on #1
The apparatus according to claim 1, further comprising a distributed parameter processor, wherein: a parameter processor in the distributed parameter processor is configured to send, receive, and aggregate a parameter and a gradient in the distributed trainer.
- Claim 3Depends on #1
The apparatus according to claim 1, wherein the reader in the distributed reader and the corresponding trainer in the distributed trainer perform data interaction in a multi-threaded fully asynchronous approach.
- Claim 4Depends on #3
The apparatus according to claim 3, wherein each reading thread in the reader in the distributed reader acquires a training sample respectively, and loads the acquired training sample to an information queue corresponding to each reading thread, so that each training thread of the trainer corresponding to the reader acquires the training sample from the corresponding information queue.
- Claim 5Depends on #1
The apparatus according to claim 1, wherein: parameters of the initial model are divided into a target number of sets of parameters based on a preset method, wherein the target number represents a number of parameter servers in the distributed parameter server; and each parameter server in the distributed parameter server is configured to store a respective set of parameters of the target number of sets of parameters.
- Claim 6Depends on #5
The apparatus according to claim 5, wherein: the trainer in the distributed trainer is further configured to determine a target parameter server in the distributed parameter server that performs data interaction with the trainer through a parameter identifier; and the communicator unit is further configured to perform data interaction between the trainer in the distributed trainer and the target parameter server corresponding to the trainer.
- Claim 7Depends on #5
The apparatus according to claim 5, wherein each parameter is associated with a corresponding parameter identifier represented by a number, and the parameters of the initial model are divided into the target number of sets of parameters by performing a modulo operation on the corresponding parameter identifier based on a value represented by the target number.
- Claim 8Depends on #1
The apparatus according to claim 1, further comprising a non-transitory machine-readable medium, wherein the non-transitory machine-readable medium stores instructions executable to provide an interface for interacting with a user.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS An Application Data Sheet is filed concurrently with this specification as part of the present application. Each application that the present application claims benefit of or priority to as identified in the concurrently filed Application Data Sheet is incorporated by reference herein in its entirety and for all purposes. TECHNICAL FIELD The present disclosure relates to the technical field of computer technology, in particular to the field of deep learning technology, and more particular to an apparatus and method for distributedly training a model, an electronic device, and a computer readable storage medium. BACKGROUND With the promotion of the wave of big data and the rapid development of deep learning technology, the data scale and the model scale that are involved in deep learning grow tremendously. The dual challenge of big data and big model is an unbearable burden for stand-alone training. Thus, it is necessary to use a data-parallel distributed training mode to meet business requirements. At present, a decentralized distributed training mode and a centralized distributed training mode are generally adopted. SUMMARY Embodiments of the present disclosure propose an apparatus and method for distributedly training a model, an electronic device, and a computer readable storage medium. According to a first aspect, an embodiment of the present disclosure provides an apparatus for distributedly training a model, including: a distributed reader, a distributed trainer and a distributed parameter server that are mutually independent. A reader in the distributed reader is configured to acquire a training sample, and load the acquired training sample to a corresponding trainer in the distributed trainer; the trainer in the distributed trainer is configured to perform model training based on the loaded training sample to obtain gradient information; and a parameter server in the distributed parameter server is configured to update
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (16)
| Patent | Title | Year | Citations |
|---|---|---|---|
| KR 20170083415 A | Image processing apparatus and control method thereof | — | 0 |
Non-Patent Literature (10)
- Dean et al. (
- “
- Large Scale Distributed Deep Networks
- ”
- , Google Inc., Mountain View, CA, 2012) (Year: 2012).
- Li et al. (
- “
- Distributed machine learning load balancing strategy in cloud computing services
- ”
- , Wireless Networks (2020) 26:5517-5533) (Year: 2020).