Parallel Query Partitioning for Language Model Latency Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Developers face challenges in incorporating machine-trained language models into applications due to high latency and resource requirements, especially with longer user queries, which affect response quality and viability in low-latency applications.
Innovation Solution
The technique partitions the user's original query into smaller component queries, each with a common part and instance-specific parts, and distributes these queries to multiple processor instances with shared cache memory, allowing for parallel processing and reduced latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the language model processes the user's query as a single stream of consecutive tokens serially, then the processing is simple to implement, but the latency is high and response time is slow
Solution Approach 1:
The patent divides the original query into multiple component queries, each representing a specific aspect or entity mentioned in the query. For example, a query about 'prices and performance of electric vehicles from manufacturers A, B, and C' is segmented into separate component queries for each manufacturer. This segmentation enables parallel processing of multiple processor instances, significantly reducing latency while maintaining manageable complexity through systematic query decomposition
2Manufacturing precision
If the language model processes longer queries, then more comprehensive information can be analyzed, but the latency increases and response quality diminishes
Solution Approach 1:
The patent segments long queries into smaller component queries focused on specific aspects, allowing each processor instance to analyze a manageable subset of information. This maintains high response quality by avoiding the noise and complexity that degrade performance in long sequential queries, while reducing total processing time through parallel execution of multiple shorter analyses
Solution Approach 2:
The patent processes specific aspects of the query in parallel rather than attempting to process the entire query sequentially. By focusing each processor instance on a specific component (e.g., prices for one manufacturer, performance for another), the system achieves comprehensive coverage of the original query without the latency penalty of processing all tokens in a single long sequence
3Adaptability or versatility
If the user submits a large query exceeding prompt-size limits, then more complete information can be provided, but the query cannot be processed and times out
Solution Approach 1:
The patent automatically segments queries that exceed prompt-size limits into multiple smaller component queries, each within the acceptable size range. This allows the system to handle arbitrarily large queries by dividing them into processable units, maintaining both adaptability to large inputs and reliability through successful parallel processing of the segmented components
Solution Approach 2:
The patent transforms the single-dimension constraint of prompt size into a multi-dimensional solution by processing queries across multiple parallel dimensions (multiple processor instances handling multiple component queries simultaneously). This allows the system to exceed traditional prompt-size limits by distributing the processing load across multiple parallel execution paths rather than being constrained by a single sequential processing channel
Data Source
AI summary
A technique partitions a user's original query into plural smaller component queries, each of which has a common part and an instance-specific part. The technique distributes the component queries to plural processor instances of a processor. The plural processor instances transform the respective component queries into query-component responses by acting in parallel, independent of each other. The technique generates a final response based on the query-component responses, e.g., by assembling the component-query responses into the final response. The technique reduces latency because the processor instances work on parts of the user's original query at the same time, rather than as a single stream of consecutive tokens. The plural processor instances have access to a shared cache memory, and utilize relevant data that has been computed in response to previous queries.


