hottub.patents
US 12,724,827 B2#3149019 Most CitedActiveUnited States (USPTO)Utility

Speculative decoding in autoregressive generative artificial intelligence models

0Forward Citations (#3149019 Global)
0.0/yrCitation Velocity (#3149019 Global)
0.00Citation PageRank (#3149019 Global)
29Prior Art Cited
8Claims (2 Indep. · 6 Dep.)
0Drawings / Sheets

Abstract

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.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 29 · Forward citations: 0.

Claims (8 — 2 Independent, 6 Dependent)

  1. Claim 1Independent Claim

    A processing system comprising: at least one memory having executable instructions stored thereon; and one or more processors configured to execute the executable instructions to cause the processing system to: receive 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 comprising a sequence of tokens corresponding to a candidate response to the input prompt, wherein: the plurality of sets of tokens is organized into a tree data structure; the tree data structure includes a plurality of levels, each level corresponding to a token in the sequence of tokens; and a number of tokens at a particular level in the tree data structure is based on a branching factor associated with an immediately prior level to the particular level in the tree data structure; select, using a second generative artificial intelligence model and recursive adjustment of a target distribution asso

  2. Claim 2Depends on #1

    The processing system of claim 1, wherein a size of each set of tokens is based on a computational complexity metric associated with generating a target set of tokens by the second generative artificial intelligence model.

  3. Claim 3Depends on #1

    The processing system of claim 1, wherein the recursive adjustment of the target distribution comprises: determining whether to accept or reject a first token in a set of tokens from the plurality of sets of tokens; and adjusting a probability distribution used to verify a second token in the set of tokens subsequent to the first token based on the determination of whether to accept or reject the first token.

  4. Claim 4Depends on #3

    The processing system of claim 3, wherein to adjust the probability distribution, the one or more processors are configured to cause the processing system to subtract a probability value associated with the first token from the probability distribution based on determining to reject the first token.

  5. Claim 5Depends on #1

    The processing system of claim 1, wherein to select the set of tokens from the plurality of sets of tokens, the one or more processors are configured to cause the processing system to: reject a first token at a first level of the tree data structure representing the plurality of sets of tokens; generate an adjusted probability distribution based on the rejection of the first token; discard or ignore, from the tree data structure, children tokens of the first token at levels deeper than the first level of the tree data structure; and determine whether to accept or reject a second token at the first level of the tree data structure based on the adjusted probability distribution.

  6. Claim 6Depends on #1

    The processing system of claim 1, wherein to select the set of tokens from the plurality of sets of tokens, the one or more processors are configured to cause the processing system to: reject each set of tokens generated by the first generative artificial intelligence model; and sample, using the second generative artificial intelligence model, a token based on a target distribution that excludes probabilities associated with each set of tokens generated by the first generative artificial intelligence model, wherein the selected set of tokens comprises the sampled token.

  7. Claim 7Depends on #1

    The processing system of claim 1, wherein: the first generative artificial intelligence model corresponds to a draft model in a speculative decoding pipeline; and the second generative artificial intelligence model corresponds to a target model in the speculative decoding pipeline.

  8. Claim 8Independent Claim

    A processing system comprising: at least one memory having executable instructions stored thereon; and one or more processors configured to execute the executable instructions to cause the processing system to: receive 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 comprising a sequence of tokens corresponding to a candidate response to the input prompt, wherein the plurality of sets of tokens is organized into a tree data structure and wherein a depth of the tree data structure corresponds to a parameter defining a maximum number of tokens generated by a single pass through the first generative artificial intelligence model; select, 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 output the

Technical Overview & Description

CROSS-REFERENCE TO RELATED APPLICATIONS The present application is a continuation of U.S. patent application Ser. No. 18/538,912, filed Dec. 13, 2023, which claims benefit of and priority to U.S. Provisional Patent Application Ser. No. 63/460,850, entitled “ Speculative Decoding in Autoregressive Generative Artificial Intelligence Models, ” filed Apr. 20, 2023, and assigned to the assignee hereof, the entire contents of both of which are hereby incorporated by reference herein in their entireties. INTRODUCTION Aspects of the present disclosure relate to generative artificial intelligence models, and more specifically to speculative decoding in generative artificial intelligence models (also referred to herein as “ generative artificial intelligence models ” ). Generative artificial intelligence models can be used in various environments in order to generate a response to an input prompt (also referred to as a query or an input). For example, generative artificial intelligence models can be used in chatbot applications in which large language models (LLMs) are used to generate an answer, or at least a response, to an input prompt. Other examples in which generative artificial intelligence models can be used include a latent diffusion model, in which a model generates an image from an input text description of the content of the desired image, decision transformers, in which future actions are predicted based on sequences of prior actions within a given environment, or the like. Generally, generating a response to a query using generative artificial intelligence models may be computationally expensive. For example, in a chatbot deployment in which a large language model is used to generate a response to a query formatted as a text query, a response to the query may be generated using a pass through the large language model for each token (e.g., a word or part of a word) generated as part of the response. The output of each pass may be a probability distribution on a s

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

Non-Patent Literature (10)

  • Chen C., et al.,
  • “
  • Accelerating Large Language Model Decoding with Speculative Sampling
  • ”
  • , Deep Mind, arXiv:2302.01318v1 [cs.CL], Feb. 2, 2023, pp. 1-11.
  • International Search Report and Written Opinion
  • —
  • PCT/US2024/017336
  • —
  • ISA/EPO