ModelRefs / Lookahead Decoding — AI Glossary

Lookahead Decoding — AI Glossary

A parallel decoding strategy that generates and verifies token n-grams in parallel without a separate draft model. Achieved 2–4× speedup on LLaMA-2 chat.

Overview

Lookahead decoding (Fu et al. 2023) maintains a Jacobi decoding window, iteratively refining multiple token positions simultaneously. Unlike speculative decoding it needs no separate model. Achieved 2–4× speedup on LLaMA-2 chat. Useful when model size precludes finding a suitable draft model.

Reference details

Topicinference
Also known asJacobi decoding
Last reviewed2026-06-24

How it works

  1. Several future token positions are guessed at once and refined in parallel, rather than one token being produced per forward pass.
  2. Each pass updates all positions in the window simultaneously, so a position's guess improves as its predecessors settle.
  3. Guesses are then verified against what the model would have produced sequentially, and accepted only where they match.
  4. An n-gram cache of previously seen continuations supplies better initial guesses, raising the acceptance rate over time.
  5. Because verification enforces the sequential result, the output distribution is unchanged — the saving is in forward passes, not in accuracy.

Example: Acceptance rate is the whole speedup

A window proposing 4 tokens per pass where 2 are accepted on average yields 2 tokens per forward pass instead of 1 — a 2x speedup, less the extra arithmetic of refining 4 positions. If only 1 is accepted on average, there is no gain and the overhead makes it slower than plain decoding. The ceiling is the window size and the floor is 1x, so the method is a bet on predictability: structured or repetitive text accepts well, and genuinely novel text does not.

Commonly confused with

Like speculative decoding, this speeds up generation without changing the output distribution. The difference is what it needs: speculation requires a separate small draft model with a matching tokenizer, which you must host and keep aligned; lookahead generates and verifies candidate n-grams using the same model, so there is no second model to serve and no acceptance rate that depends on model-pair quality.

When to use it

Reach for it when:

  • Generation speed matters and no suitable draft model exists for speculative decoding.
  • Output is repetitive or structured, where guesses are accepted often.
  • The output distribution must be preserved exactly.

Reach for something else when:

  • A good draft model is available, where speculative decoding usually accepts more.
  • Output is highly novel, so acceptance is low and the overhead dominates.
  • Memory is tight — the window and cache cost memory a plain decode does not.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Lookahead Decoding — AI Glossary.

Frequently asked questions

What is Lookahead Decoding?

A parallel decoding strategy that generates and verifies token n-grams in parallel without a separate draft model.

Is Lookahead Decoding the same as Jacobi decoding?

Yes — Jacobi decoding are common aliases for Lookahead Decoding.

What concepts are related to Lookahead Decoding?

Closely related concepts include speculative decoding, draft model, throughput.