# US 2022/0283820 A1 · Data parallelism in distributed training of artificial intelligence models

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0283820 A1
- Document ID: US20220283820A1
- Status: Published application
- Kind: A1
- Application number: 17/752,044
- Filed: 2022-05-24
- Published: 2022-09-08
- Earliest claimed: 2019-07-15
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Bharadwaj Pudipeddi; Marc Tremblay; Sujeeth Subramanya Bharadwaj; Devangkumar Patel; Jinwen Xi; Maral Mesmakhosroshahi
- Web page: https://patentgrep.com/patent/US20220283820A1

## CPC

- G06F 9/3877: {using a secondary processor, e.g. coprocessor (peripheral processor G06F13/12)}
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/048: Activation functions
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/09: Supervised learning
- G06N 3/098: Distributed learning, e.g. federated learning
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- H04L 67/289: Intermediate processing functionally located close to the data consumer application, e.g. in same machine, in same home or in same sub-network
- H04L 67/34: {involving the movement of software or configuration parameters (network booting or remote initial program loading [RIPL] G06F9/4416)}
- G06N 3/063: using electronic means
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods, systems, apparatuses, and computer program products are described herein that enable execution of a large AI model on a memory-constrained target device that is communicatively connected to a parameter server, which stores a master copy of the AI model. The AI model may be dissected into smaller portions (e.g., layers or sub-layers), and each portion may be executed as efficiently as possible on the target device. After execution of one portion of the AI model is finished, another portion of the AI model may be downloaded and executed at the target device. To improve efficiency, the input samples may be divided into microbatches, and a plurality of microbatches executing in sequential order may form a minibatch. The size of the group of microbatches or minibatch can be adjusted to reduce the communication overhead. Multi-level parallel parameters reduction may be performed at the parameter server and the target device.

## Claims

### Claim 1

A system, comprising:
a parameter server communicatively connected to a target device, the parameter server comprises:
a transmitter configured to transmit a portion of an artificial intelligence (AI) model to the target device, the target device comprising an integrated circuit chip having an on-chip memory of a size less than an entirety of the AI model, and a size of the portion being based at least on the on-chip memory size and a size of one or more layers of the AI model; and
contemporaneously, with a set of microbatches of a training dataset being executed by the integrated circuit chip at the target device on a first subportion of the transmitted portion of the AI model stored in the on-chip memory to generate gradients,
a weight updater is configured to perform a reduction of parameters for a second subportion of the transmitted portion of the AI model, and
the transmitter is further configured to send weights for a third subportion of the transmitted portion of the AI model to the target device.

### Claim 2 (depends on 1)

The system of claim 1, wherein wherein the first subportion of the transmitted portion of the AI model comprises a current layer of the AI model and the second subportion of the transmitted portion of the AI model comprises a prior layer of the AI model.

### Claim 3 (depends on 1)

The system of claim 1, wherein the first subportion of the transmitted portion of the AI model comprises a current layer of the AI model and the third subportion of the transmitted portion of the AI model comprises a next layer of the AI model.

### Claim 4 (depends on 1)

The system of claim 1, wherein the weight updater is configured to:
perform reduction of parameters by:
receiving gradients from the target device, the gradients being generated by the target device executing the set of microbatches of the training dataset on the second subportion at the target device; and
generating an average of the received gradients; and
update the AI model with the average of the received gradients.

### Claim 5 (depends on 1)

The system of claim 1, wherein a microbatch size is configurable based on a rate of executing the set of microbatches at the target device and a rate of communication between the target device and the parameter server.

### Claim 6 (depends on 1)

The system of claim 1, wherein the parameter server further comprises a precision formatter configured to:
convert weights for a fourth subportion of the transmitted portion of the AI model to a first precision format prior to sending the weights to the target device;
convert gradients received from the target device to a second precision format; and
update the weights using the converted gradients.

### Claim 7 (depends on 1)

The system of claim 1, wherein the transmitter is further configured to transmit another portion of the AI model to another target device; and the weight updater is further configured to receive gradients from the another target device to perform reduction of parameters for the another portion of the AI model.

### Claim 8

A method implemented in a parameter server, comprising:
transmitting a portion of a stored artificial intelligence (AI) model to a target device, the target device comprising an integrated circuit chip having an on-chip memory of a size less than an entirety of the AI model, and a size of the portion being based at least on the on-chip memory size and a size of one or more layers of the AI model; and
contemporaneously, with a set of microbatches, of a determined size, of a training dataset being executed by the integrated circuit chip at the target device on a first subportion of the transmitted portion of the AI model stored in the on-chip memory to generate gradients, performing a reduction of parameters for a second subportion of the transmitted portion of the AI model and sending weights for a third subportion of the transmitted portion of the AI model to the target device.

### Claim 9 (depends on 8)

The method of claim 8, wherein wherein the first subportion of the transmitted portion of the AI model comprises a current layer of the AI model and the second subportion of the transmitted portion of the AI model comprises a prior layer of the AI model.

### Claim 10 (depends on 8)

The method of claim 8, wherein the first subportion of the transmitted portion of the AI model comprises a current layer of the AI model and the third subportion of the transmitted portion of the AI model comprises a next layer of the AI model.

### Claim 11 (depends on 8)

The method of claim 8, wherein the performing reduction of parameters comprises:
receiving gradients from the target device, the gradients being generated from executing the set of microbatches of the training dataset on the second subportion at the target device; and
generating an average of the received gradients;
wherein the method further comprises:
updating the AI model with the average of the received gradients.

### Claim 12 (depends on 8)

The method of claim 8, wherein a microbatch size is configurable based on a rate of executing the set of microbatches at the target device and a rate of communication between the target device and the parameter server.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
converting weights for a fourth subportion of the transmitted portion of the AI model to a first precision format prior to sending the weights to the target device;
converting gradients received from the target device to a second precision format; and
updating the weights using the converted gradients.

### Claim 14 (depends on 8)

The method of claim 8, further comprising:
transmitting another portion of the AI model to another target device; and
receiving gradients from the another target device to perform reduction of parameters for the another portion of the AI model.

### Claim 15

A computer program product comprising a computer-readable storage device having computer program logic recorded thereon that when executed by a processor- based computer system causes the processor-based system to perform a method, the method comprising:
transmitting a portion of a stored artificial intelligence (AI) model to a target device, the target device comprising an integrated circuit chip having an on-chip memory of a size less than an entirety of the AI model, and a size of the portion being based at least on the on-chip memory size and a size of one or more layers of the AI model;
contemporaneously, with a set of microbatches, of a determined size, of a training dataset being executed by the integrated circuit chip at the target device on a first subportion of the transmitted portion of the AI model stored in the on-chip memory to generate gradients, performing at least one of a reduction of parameters for a second subportion of the transmitted portion of the AI model or sending weights for a third subportion of the transmitted portion of the AI model to the target device.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the first subportion of the transmitted portion of the AI model comprises a current layer of the AI model and the second subportion of the transmitted portion of the AI model comprises a prior layer of the AI model.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein the first subportion of the transmitted portion of the AI model comprises a current layer of the AI model and the third subportion of the transmitted portion of the AI model comprises a next layer of the AI model.

### Claim 18 (depends on 15)

The computer program product of claim 15, wherein the method further comprises:
converting weights for a fourth subportion of the transmitted portion of the AI model to a first precision format prior to sending the weights to the target device;
converting gradients received from the target device to a second precision format; and
updating the weights using the converted gradients.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein a microbatch size is configurable based on a rate of executing the set of microbatches at the target device and a rate of communication between the target device and the parameter server.

### Claim 20 (depends on 15)

The computer program product of claim 15, wherein the method further comprises:
transmitting another portion of the AI model to another target device; and
receiving gradients from the another target device to perform reduction of parameters for the another portion of the AI model.
