Neural Network Model Sharing for Memory Bandwidth Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current neural network deployment systems are inefficient due to the sub-optimal use of memory bandwidth and computational resources, as each worker thread independently loads the neural network model, leading to increased latency and reduced throughput.
Innovation Solution
Implementing a batching system where multiple requests are orchestrated by a single thread that shares a common neural network model, dynamically assembling requests into batches to reduce memory loading and computational latency, and utilizing compute engines like GPUs for efficient processing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If each worker thread independently loads the neural network model, then the code is simple to write and reason about, but the memory bandwidth utilization is sub-optimal and latency increases
Solution Approach 1:
Multiple worker threads share a single loaded copy of the neural network model in memory, eliminating redundant memory loads. The model is loaded once by one thread and then shared across all worker threads through memory mapping or reference sharing, reducing memory bandwidth consumption and improving cache utilization.
Solution Approach 2:
The neural network model is pre-loaded into memory before processing requests, and multiple threads are then able to access this pre-loaded model simultaneously. This preliminary loading action eliminates the need for each thread to load the model independently during request processing.
2Reliability
If each worker thread independently loads the neural network model, then failover is easier to reason about, but computational resources are wasted and throughput is reduced
Solution Approach 1:
Multiple worker threads share a single loaded copy of the neural network model in memory, eliminating redundant memory loads. The model is loaded once by one thread and then shared across all worker threads through memory mapping or reference sharing, reducing memory bandwidth consumption and improving cache utilization.
Solution Approach 2:
A single neural network model instance serves multiple worker threads simultaneously, making the model loading mechanism universal rather than thread-specific. This multi-functional approach allows the same model to be accessed by any number of worker threads without requiring separate loading instances.
3Loss of time
If requests are processed individually by single threads, then latency is minimized and failover is easier to reason about, but memory bandwidth utilization is inefficient
Solution Approach 1:
Multiple worker threads share a single loaded copy of the neural network model in memory, eliminating redundant memory loads. The model is loaded once by one thread and then shared across all worker threads through memory mapping or reference sharing, reducing memory bandwidth consumption and improving cache utilization.
Data Source
AI summary
Disclosed are systems and methods that implement efficient engines for computation-intensive tasks such as neural network deployment. Various embodiments of the invention provide for high-throughput batching that increases throughput of streaming data in high-traffic applications, such as real-time speech transcription. In embodiments, throughput is increased by dynamically assembling into batches and processing together user requests that randomly arrive at unknown timing such that not all the data is present at once at the time of batching. Some embodiments allow for performing steaming classification using pre-processing. The gains in performance allow for more efficient use of a compute engine and drastically reduce the cost of deploying large neural networks at scale, while meeting strict application requirements and adding relatively little computational latency so as to maintain a satisfactory application experience.


