Distributed Model Training Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current data parallel training methods for machine learning models face communication bottlenecks and accuracy issues, especially when using a large number of processors, leading to increased training time and reduced model accuracy.

Innovation Solution

A distributed model training system that synchronizes model weights between processors every training cycle and every K cycles, reducing communication costs and increasing accuracy by using partial and full synchronization techniques, and leveraging peer-to-peer communication on multiple GPUs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If data parallel training methods use a large number of processors, then training speed increases, but communication costs increase and model accuracy decreases

Engineering Contradiction:
Improvetraining speedVSAvoidcommunication costs
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system segments processors into multiple groups and performs partial synchronization within each group, reducing the communication overhead compared to full synchronization across all processors. This allows faster training speed with reduced communication costs by dividing the synchronization task into smaller, more manageable segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs partial synchronization of model weights rather than full synchronization across all processors at every training cycle. By synchronizing only certain weights or synchronizing less frequently, the system reduces communication costs while maintaining adequate model accuracy and training speed.

Inventive Principle:
Principle #16Partial or excessive action

2Productivity

If data parallel training methods use a large number of processors, then training speed increases, but model accuracy decreases

Engineering Contradiction:
Improvetraining speedVSAvoidmodel accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system performs full synchronization of model weights periodically every K training cycles rather than at every cycle. This periodic full synchronization ensures model accuracy is maintained while allowing faster training between synchronization points, resolving the contradiction between training speed and model accuracy.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The system divides synchronization into partial synchronizations within processor groups and full synchronizations across all processors. This segmented approach maintains model accuracy through regular full synchronizations while enabling faster training through more frequent but lighter partial synchronizations.

Inventive Principle:
Principle #1Segmentation

3Manufacturing precision

If full synchronization is performed between all processors every training cycle, then model accuracy is maintained, but communication costs and training time increase

Engineering Contradiction:
Improvemodel accuracyVSAvoidtraining time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system performs full synchronization every K training cycles instead of every cycle, reducing the frequency of expensive full synchronization operations. This periodic approach maintains model accuracy while significantly reducing communication time and training time overhead.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The system performs partial synchronization within processor groups between full synchronizations, providing sufficient weight updates to maintain accuracy without requiring full synchronization at every step. This reduces training time while preserving model quality.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11853391B1Distributed model training
Publication Date: 2023.12.26 AMAZON TECH INC
  • US11853391B1 patent drawing
  • US11853391B1 patent drawing
  • US11853391B1 patent drawing

AI summary

Exemplary embodiments provide distributed parallel training of a machine learning model. Multiple processors may be used to train a machine learning model to reduce training time. To synchronize trained model data between the processors, data is communicated between the processors after some number of training cycles. To improve the communication efficiency, exemplary embodiments synchronize data among a set of processors after a predetermined number of training cycles, and synchronize data between one or more processors of each set of the processors after a predetermined number of training cycles. During the first synchronization among a set of processors, compressed model gradient data generated after performing the training cycles may be communicated. During the second synchronization between the set of processors, trained models or full model gradient data generated after performing the training cycles may be communicated.