Neural Network Model Fragmentation for Memory-Constrained Serving

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvemodel serving capabilityVSAvoidmemory usage
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If complete models are deployed for each variant, then model accuracy is maintained, but deployment cost and resource consumption increase

Engineering Contradiction:
Improvemodel accuracyVSAvoiddeployment complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #7Nested doll (Nesting)

3Productivity

If large models are deployed to meet growing demand, then model performance is improved, but memory requirements exceed available accelerator memory

Engineering Contradiction:
Improvemodel performanceVSAvoidmemory requirements
Core Design Contradiction:
ProductivityVSQuantity of substance

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

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

Engineering Contradiction:
Improvetask versatilityVSAvoidinference latency
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

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.

Inventive Principle:
Principle #5Merging (Combining)

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11604961B2Scalable model serving
Publication Date: 2023.03.14 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11604961B2 patent drawing
  • US11604961B2 patent drawing
  • US11604961B2 patent drawing

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.