Speculative Decoding With Draft-Model Verification for Faster Token Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Generative artificial intelligence models are computationally expensive due to the need for multiple passes through large language models to generate responses, which is impractical for devices with limited resources and can hinder other tasks by consuming memory bandwidth.

Innovation Solution

Implementing a smaller draft model to speculatively generate tokens, which are then verified by a target model using recursive rejection sampling, allowing for efficient generation and verification of token sequences.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a large language model is used to generate each token sequentially, then the response generation is accurate and comprehensive, but the computational expense increases significantly

Engineering Contradiction:
Improveresponse generation accuracyVSAvoidcomputational expense
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent divides the token generation process into two segments: a draft model that generates multiple candidate tokens in parallel, and a target model that verifies and selects from these candidates. This segmentation allows the computationally intensive verification step to be performed only on a subset of candidates rather than generating each token sequentially through a large model, thereby reducing overall computational expense while maintaining accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses a draft model that is a simplified copy or approximation of the target model. This draft model generates multiple candidate tokens quickly, and then the target model verifies these candidates. The draft model acts as a computational shortcut that reduces the burden on the full target model, effectively copying its functionality at a lower computational cost for the generation phase.

Inventive Principle:
Principle #26Copying

2Productivity

If multiple passes through the large language model are performed for token generation, then the response is generated comprehensively, but the memory bandwidth consumption increases

Engineering Contradiction:
Improveresponse generation completenessVSAvoidmemory bandwidth consumption
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The draft model performs preliminary generation of multiple candidate tokens before the target model processes them. This preliminary action creates a pool of candidates that the target model can then verify in parallel, eliminating the need for sequential passes through the large model for each token. The preliminary generation handles the bulk of the computational work, reducing memory bandwidth consumption during the verification phase.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent transitions from a sequential, one-dimensional token generation approach to a parallel, multi-dimensional approach where multiple candidate tokens are generated and verified simultaneously. By processing multiple tokens in parallel across different computational dimensions, the system maintains comprehensive response generation while significantly reducing memory bandwidth consumption compared to sequential processing.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Use of energy by moving object

If a smaller draft model is used for speculative generation, then the computational expense is reduced, but the probability distribution accuracy may be compromised

Engineering Contradiction:
Improvecomputational expenseVSAvoidprobability distribution accuracy
Core Design Contradiction:
Use of energy by moving objectVSMeasurement precision

Solution Approach 1:

The draft model serves as an intermediary between the input prompt and the final output. It generates candidate tokens that are then verified by the target model, which adjusts the probability distribution based on the verified candidates. This intermediary approach allows the draft model to perform computation at lower cost while the target model ensures accuracy through verification and distribution adjustment, resolving the trade-off between computational expense and accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The target model provides feedback to the draft model by verifying candidates and adjusting the probability distribution. This feedback mechanism ensures that the draft model's speculative generation is guided by the target model's accuracy requirements, allowing the system to maintain probability distribution accuracy while benefiting from the draft model's lower computational cost. The feedback loop continuously refines the generation process.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250231989A1Speculative decoding in autoregressive generative artificial intelligence models
Publication Date: 2025.07.17 QUALCOMM INC
  • US20250231989A1 patent drawing
  • US20250231989A1 patent drawing
  • US20250231989A1 patent drawing

AI summary

Certain aspects of the present disclosure provide techniques and apparatus for generating a response to a query input in a generative artificial intelligence model. An example method generally includes receiving a plurality of sets of tokens generated based on an input prompt and a first generative artificial intelligence model, each set of tokens in the plurality of sets of tokens corresponding to a candidate response to the input prompt; selecting, using a second generative artificial intelligence model and recursive adjustment of a target distribution associated with the received plurality of sets of tokens, a set of tokens from the plurality of sets of tokens; and outputting the selected set of tokens as a response to the input prompt.