Multi-Chip LLM Inference With Ring-Shared K-V Cache
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The increasing demand for high-performance large language models (LLMs) in natural language processing is hindered by the exponential growth in data computation and model parameter size, leading to higher costs and time requirements.
Innovation Solution
A method for processing natural language using a neural computing apparatus, processor, or system comprising multiple chips, cores, or nodes, each equipped with self-attention, layer normalization, expert, and routing units, that share K-V cache data and K-V pairs through a ring-type data sharing method to optimize computations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If large language models are used to improve natural language processing performance, then processing accuracy is improved, but computational cost and time increase exponentially
Solution Approach 1:
The patent divides the large language model into multiple expert units (e.g., sparse expert units and dense expert units) that can be selectively activated. Instead of computing through all parameters, the system segments the model into specialized units and routes inputs to relevant experts, reducing computational time while maintaining accuracy.
Solution Approach 2:
The patent implements dynamic routing mechanisms that adaptively select which expert units to activate based on input characteristics. The routing network dynamically determines the appropriate expert units for each token, allowing the system to adjust computation depth and breadth in real-time, thereby reducing overall computation time while preserving accuracy for complex inputs.
2Measurement precision
If large language models are used to improve natural language processing performance, then processing accuracy is improved, but computational cost increases
Solution Approach 1:
The patent applies partial action by activating only a subset of expert units for each computation rather than using all model parameters. The routing mechanism selects the minimum necessary number of expert units required to achieve accurate processing, reducing computational cost while maintaining performance through selective engagement of model components.
Solution Approach 2:
The patent changes the effective parameter utilization by dynamically adjusting which model parameters are activated through the routing network. Instead of using a fixed large number of parameters, the system adapts parameter selection based on input requirements, reducing computational cost while preserving accuracy through intelligent parameter routing.
3Power
If multiple chips are used to perform neural computations, then computational capacity is improved, but memory usage and data synchronization complexity increase
Solution Approach 1:
The patent merges the K-V cache memory across multiple chips into a shared resource. Instead of each chip maintaining separate caches, the system combines cache memory resources and implements unified management, reducing overall memory usage and simplifying synchronization by treating the cache as a single shared entity across the chip cluster.
Solution Approach 2:
The patent implements universal K-V cache sharing where the same cache memory serves multiple chips simultaneously. The cache system is designed to be multi-functional, handling read/write operations for multiple chips through a unified interface, thereby reducing memory redundancy and simplifying data synchronization across the computational system.
4Power
If multiple chips are used to perform neural computations, then computational capacity is improved, but memory usage increases
Solution Approach 1:
The patent merges K-V cache memory across multiple chips into a shared pool. Instead of duplicating cache memory on each chip, the system combines memory resources and implements shared access, significantly reducing total memory usage while maintaining the computational capacity provided by multiple chips.
Solution Approach 2:
The patent implements selective copying of K-V cache data between chips only when necessary, rather than maintaining full copies on all chips. The ring-type data sharing method copies data incrementally and selectively, reducing overall memory usage while ensuring data availability across the chip cluster for parallel computations.
Data Source
AI summary
As an embodiment of the present disclosure, provided is a method for processing natural language, which is performed in a neural computing apparatus including a plurality of chips, a controller that controls the plurality of chips, and a memory that stores data accessible to the plurality of chips, in which the method includes acquiring a token sequence including one or more tokens, performing a computation on the token sequence using the plurality of chips, and determining a subsequent token of the token sequence as a result of the computation.


