Neural Network Model Fragmentation for Memory-Constrained Serving
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Serving multiple variants of neural network models can be costly due to the need to keep all models loaded in memory, as conventional techniques like transfer learning result in many models sharing common layers but not efficiently utilizing this commonality.
Innovation Solution
A method of recursively factoring out common prefixes of neural network models to enable them to be loaded into memory once and shared across models, constructing a hierarchy of decomposed model fragments, and grouping them for deployment to reduce memory usage and inference costs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If all model variants are loaded in memory for serving, then model serving capability is improved, but memory usage and cost increase significantly
Solution Approach 1:
The patent segments neural network models into hierarchical fragments organized in a tree structure, where common prefix layers are shared across multiple model variants. This segmentation allows the system to serve multiple model variants without loading complete copies of each model in memory, thereby improving model serving capability while reducing memory usage.
Solution Approach 2:
The patent creates a universal base model fragment that serves multiple functions across different model variants. The shared prefix layers are designed to be universally applicable to multiple downstream tasks and model variants, allowing a single memory-resident fragment to support inference for multiple models simultaneously.
2Reliability
If complete models are deployed for each variant, then model accuracy is maintained, but deployment cost and resource consumption increase
Solution Approach 1:
The patent divides complete models into modular fragments organized in a hierarchical tree structure. Each fragment represents a functional segment of the model that can be independently deployed and managed. This segmentation maintains model accuracy by preserving the complete computational graph when needed while simplifying deployment through modular organization.
Solution Approach 2:
The patent implements a nested fragment structure where smaller model fragments are nested within larger parent fragments, forming a hierarchical tree. This nesting allows the system to deploy only the necessary portions of models for each variant while sharing common ancestor fragments, thereby maintaining accuracy for each variant while reducing overall deployment complexity.
3Productivity
If large models are deployed to meet growing demand, then model performance is improved, but memory requirements exceed available accelerator memory
Solution Approach 1:
The patent segments large models into smaller hierarchical fragments that can be selectively loaded into accelerator memory based on the specific inference task. This segmentation enables the system to handle large model architectures by loading only the necessary fragment subsets, thereby improving model performance while keeping memory requirements within available accelerator capacity.
Solution Approach 2:
The patent introduces a hierarchical dimension to model organization, creating a tree structure of fragments across multiple levels. This dimensional organization allows the system to manage large models by navigating through hierarchical levels and loading only the relevant fragments for each inference request, effectively scaling model performance without linearly increasing memory requirements.
4Adaptability or versatility
If multiple complete models are kept in memory for different tasks, then task versatility is improved, but inference latency increases due to memory access overhead
Solution Approach 1:
The patent merges multiple model variants into a unified hierarchical fragment tree structure, where common prefix layers are consolidated into shared memory-resident fragments. This merging eliminates redundant memory access overhead by ensuring that common computations are performed once and shared across multiple tasks, thereby maintaining task versatility while reducing inference latency.
Solution Approach 2:
The patent designs the shared base fragments to be universally functional across multiple downstream tasks and model variants. This universality allows a single memory-resident fragment to serve multiple inference requests simultaneously without requiring separate memory copies, thereby achieving task versatility while minimizing memory access overhead and inference latency.
Data Source
AI summary
A neural network models fragmenting method, system, and computer program product include recursively factoring out common prefixes of models, constructing a hierarchy of decomposed model fragments based on the factoring, and grouping the constructed hierarchy for deployment.


