Lune

NeurIPS2024Top-tier venue

Superposed Decoding: Multiple Generations from a Single Autoregressive Inference Pass

Ethan Shen, Alan Fan, Sarah M. Pratt, Jae Sung Park, Matthew Wallingford, Sham M. Kakade, Ari Holtzman, Ranjay Krishna, Ali Farhadi, Aditya Kusupati

Abstract

Many applications today provide users with multiple auto-complete drafts as they type, including GitHub's code completion, Gmail's smart compose, and Apple's messaging auto-suggestions. Under the hood, language models support this by running an autoregressive inference pass to provide a draft. Consequently, providing kk drafts to the user requires running an expensive language model kk times. To alleviate the computation cost of running kk inference passes, we propose Superposed Decoding, a new decoding algorithm that generates kk drafts at the computation cost of one autoregressive inference pass. We achieve this by feeding a superposition of the most recent token embeddings from the kk drafts as input to the next decoding step of the language model. At every inference step we combine the kk drafts with the top-kk tokens to get k2k^2 new drafts and cache the kk most likely options, using an n-gram interpolation with minimal compute overhead to filter out incoherent generations. Our experiments show that kk drafts from Superposed Decoding are at least as coherent and factual as Nucleus Sampling and Greedy Decoding respectively, while being at least 2.44×2.44\times faster for k≥3k\ge3. In a compute-normalized setting, user evaluations demonstrably favor text generated by Superposed Decoding over Nucleus Sampling. Superposed Decoding can also be combined with other decoding strategies, resulting in universal coverage gains when scaling inference time compute. Code and more examples open-sourced at https://github.com/RAIVNLab/SuperposedDecoding.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Q-Probe: A Lightweight Approach to Reward Maximization for Language Models cites The Curious Case of Neural Text Degeneration
  • Measuring Massive Multitask Language Understanding cites Language Models are Few-Shot Learners
  • Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
  • Fast Inference from Transformers via Speculative Decoding cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Q-Probe: A Lightweight Approach to Reward Maximization for Language ModelsKenneth Li, Samy Jelassi, Hugh Zhang, Sham M. Kakade et al.ICML 2024 · 18 citations
  2. Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in SuperpositionZheyang Xiong, Ziyang Cai, John Cooper, Albert Ge et al.ICML 2025

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  3. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  4. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  5. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations

Related papers

  1. Draft on the Fly: Adaptive Self-Speculative Decoding using Cosine SimilarityMichael R. Metel, Peng Lu, Boxing Chen, Mehdi Rezagholizadeh et al.EMNLP Findings 2024 · 1 citation
  2. Local Normalization Distortion and the Thermodynamic Formalism of Decoding Strategies for Large Language ModelsTom Kempton, Stuart BurrellEMNLP Findings 2025
  3. Speculative Speculative DecodingTanishq Kumar, Tri Dao, Avner MayICLR 2026 · 15 citations
  4. Automatic Detection of Generated Text is Easiest when Humans are FooledDaphne Ippolito, Daniel Duckworth, Chris Callison-Burch, Douglas EckACL 2020 · 21 citations
  5. SpecBound: Adaptive Bounded Self-Speculation with Layer-wise Confidence CalibrationZhuofan Wen, Yang FengACL Findings 2026
Dusk over the sea between two cliffs drawn in fine vertical lines