Dynamic Multi-Layer AI Model Execution on Memory-Constrained Devices

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep learning models require substantial computing power and memory, especially for large AI models, which can be challenging to execute on memory-constrained devices due to limitations in GPU memory capacity and synchronization requirements, leading to inefficiencies in model parallelism and data parallelism approaches.

Innovation Solution

A system comprising a parameter server and target devices, where the AI model is dissected into smaller portions, executed efficiently on memory-constrained devices, and managed through a data manager, batch manager, transmitter, output data manager, and model assessor to optimize microbatch size and communication overhead, enabling dynamic execution and mixed-precision training.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Power

If multiple GPUs are run in data-parallel manner to improve throughput, then computing power is increased, but memory capacity limitations and synchronization overhead increase

Engineering Contradiction:
Improvecomputing powerVSAvoidsynchronization overhead
Core Design Contradiction:
PowerVSDevice complexity

Solution Approach 1:

The AI model is segmented into multiple layers that are distributed across different GPUs. Each GPU processes a specific subset of layers independently, eliminating the need for frequent synchronization between devices. This segmentation allows the system to scale computing power across multiple GPUs while avoiding the synchronization overhead that plagues data-parallel approaches.

Inventive Principle:
Principle #1Segmentation

2Productivity

If large AI models are executed on memory-constrained devices, then resource utilization is improved, but model size exceeds available memory capacity

Engineering Contradiction:
Improveresource utilizationVSAvoidmodel size
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The model is divided into layer segments that are loaded into device memory only when needed for processing. This allows execution of models that are larger than the available memory capacity by streaming model parameters between host and device memory as computation progresses through different layers.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Model layers are pre-loaded into device memory in advance of when they are needed for computation. This preliminary action optimizes memory utilization by ensuring that required model parameters are already in fast device memory when computation begins, rather than loading them during execution.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If microbatch size is optimized for target device, then computation throughput is improved, but communication overhead increases

Engineering Contradiction:
Improvecomputation throughputVSAvoidcommunication overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The microbatch size is dynamically adjusted based on the specific characteristics of the target device, including its memory capacity, computational throughput, and communication bandwidth. This dynamic optimization allows the system to maximize computation throughput while minimizing communication overhead by finding the optimal microbatch size for each device configuration.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11354579B2Dynamic multi-layer execution for artificial intelligence modeling
Publication Date: 2022.06.07 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11354579B2 patent drawing
  • US11354579B2 patent drawing
  • US11354579B2 patent drawing

AI summary

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. This paradigm of executing one portion of the AI model at a time allows for dynamic execution of the large AI model.