Transformer Model Training Resource Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing transformer model training methods fail to fully utilize computing resources and off-chip memory bandwidth due to varying operation per byte ratios, leading to underutilization of resources during training processes.

Innovation Solution

The method involves dividing batches into micro-batches with no dependency, forming layer pairs, determining resource allocation based on operation per byte ratios, and assigning layers to resource cores or unified vector units to minimize idle time and total operation execution time, thereby optimizing resource utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If batches are processed as single large units in transformer model training, then memory bandwidth utilization may be improved, but computing resource utilization deteriorates due to idle time between operations

Engineering Contradiction:
Improvememory bandwidth utilizationVSAvoidcomputing resource utilization
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments large batches into multiple micro-batches that can be processed independently and in parallel. This segmentation allows different micro-batches to be assigned to different computing resources simultaneously, eliminating idle time and improving computing resource utilization while maintaining efficient memory bandwidth usage through coordinated processing of the segmented batches.

Inventive Principle:
Principle #1Segmentation

2Speed

If computing resources are allocated to layers with high operation per byte ratio, then computing speed is improved, but memory bandwidth utilization deteriorates

Engineering Contradiction:
Improvecomputing speedVSAvoidmemory bandwidth utilization
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent applies local quality by allocating different computing resources to different layers based on their specific operation per byte ratio characteristics. Layers with high operation per byte ratio are assigned to computing-optimized resources, while layers with low operation per byte ratio are assigned to memory-optimized resources, ensuring optimal utilization of both computing speed and memory bandwidth for each specific layer.

Inventive Principle:
Principle #3Local quality

3Reliability

If layers are processed sequentially in transformer training, then dependency constraints are satisfied, but total operation execution time increases

Engineering Contradiction:
Improvedependency constraint satisfactionVSAvoidtotal operation execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent introduces dynamic processing by allowing the processing order and resource allocation to adapt based on layer characteristics and availability. While maintaining the required sequential dependency constraints between layers, the system dynamically assigns different micro-batches to different resources and adjusts processing schedules to minimize idle time, thereby reducing total execution time without violating dependency constraints.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS20240232581A9Method and apparatus with transformer model training
Publication Date: 2024.07.11 SAMSUNG ELECTRONICS CO LTD
  • US20240232581A9 patent drawing
  • US20240232581A9 patent drawing
  • US20240232581A9 patent drawing

AI summary

A device including processors configured to execute instructions and memories storing the instructions, which when executed by the processors configure the processors to perform an operation for training a transformer model having a plurality of encoders and a plurality of decoders by configuring the processors to identify the batches of training data into a plurality of micro-batches, select layer pairs for the plurality of micro-batches, assemble a processing order of the layer pairs, determining resource information to be allocated to the layer pairs, and allocate resources to the layer pairs based on the determined resource information to be allocated to the layer pairs, dependent con the processing order of the layer pairs.