Dynamic Multi-Layer AI Model Execution on Memory-Constrained Devices
Find Innovative SolutionsGenerate 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
Engineering 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
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.
2Productivity
If large AI models are executed on memory-constrained devices, then resource utilization is improved, but model size exceeds available memory capacity
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.
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.
3Productivity
If microbatch size is optimized for target device, then computation throughput is improved, but communication overhead increases
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.
Data Source
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.


