LLM Cache Hashing and Partial Output Reuse for Low Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing natural language processing systems using large language models (LLMs) face challenges in reducing latency and computational resource usage due to the complexity and variability of contextual inputs, leading to inefficient cache management and frequent cache refresh costs.

Innovation Solution

A cache system is employed for LLM processing that uses a signal hashing model to generate unique keys for context data, allowing for cache hits to utilize stored outputs and partial outputs to continue processing from previous states, with a controller managing timeouts and cache refresh decisions based on machine learning predictions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If a cache system is used to store LLM outputs for different contexts, then latency is reduced and computational resources are saved, but cache management complexity increases and cache refresh costs increase due to variability of contextual inputs

Engineering Contradiction:
ImprovelatencyVSAvoidcache management complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by pre-computing and caching LLM outputs for anticipated contexts before actual queries arrive. The controller predicts which contexts are likely to be queried and proactively refreshes cache entries, avoiding the need to wait for actual requests and reducing latency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The cache management system dynamically adjusts its behavior based on real-time conditions. The controller monitors cache hit rates, query patterns, and system resources, then dynamically modifies refresh intervals and caching strategies to balance between cache validity and management complexity.

Inventive Principle:
Principle #15Dynamics

2Reliability

If cache refresh operations are performed frequently to ensure output relevance, then cache hit rates improve, but computational resource usage and system cost increase

Engineering Contradiction:
Improvecache hit rateVSAvoidcomputational resource usage
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system implements feedback mechanisms where the controller monitors actual cache performance metrics including hit rates, miss patterns, and query distributions. This feedback information is used to continuously optimize refresh strategies, ensuring that cache operations are performed only when necessary to maintain relevance.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes operational parameters dynamically based on conditions. The controller adjusts refresh intervals, caching thresholds, and prediction models based on real-time data about query patterns and context variability, optimizing the balance between cache hit rates and computational resource consumption.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12579974B1Cache techniques for large language model processing
Publication Date: 2026.03.17 AMAZON TECH INC
  • US12579974B1 patent drawing
  • US12579974B1 patent drawing
  • US12579974B1 patent drawing

AI summary

Techniques for cache management for LLM processing are described. Example embodiments include a signal hashing model that generates a key for particular context data. An LLM output corresponding to the context data is stored in a cache along with the key. For a user input received by the system, a cache lookup is performed using a key for context data corresponding to the received user input. For a cache hit, the stored output is used to respond to the user input. For a cache miss, a LLM processes the context data and the user input to generate an output within a first timeout. If the LLM is unable to generate an output within the first timeout, then in some cases, the LLM is allowed to continue processing until a second timeout, and a final or partial output from the LLM is stored in the cache.