Multi-granular clustering-based solution for key-value cache compression
AssigneeIntel Corporation
InventorsGopi Krishna Jha, Sameh Gobriel, Nilesh Jain
Life of this patent
Estimating the term…
Loading patent…
AssigneeIntel Corporation
InventorsGopi Krishna Jha, Sameh Gobriel, Nilesh Jain
Estimating the term…
Key-value (KV) caching accelerates inference in large language models (LLMs) by allowing the attention operation to scale linearly rather than quadratically with the total sequence length. Due to large context lengths in modern LLMs, KV cache size can exceed the model size, which can negatively impact throughput. To address this issue, a multi-granular clustering-based solution for KV cache compression can be implemented. Key tensors and value tensors corresponding unimportant tokens can be approximated using clusters created at different clustering-levels with varying accuracy. Accuracy loss can be mitigated by using proxies produced at finer granularity clustering-level for a subset of attention heads that are more significant. More significant attention heads can have a higher impact on model accuracy than less significant attention heads. Latency is improved by retrieving proxies from a faster memory for a subset of attention heads that are less significant, when impact on accuracy is lower.
An apparatus comprising:
One or more non-transitory computer-readable media storing instructions executable by a processor to perform operations for memory management, the operations comprising:
A method, comprising:
Dependencies are inferred from the claim text.