Inference Engineering

VI. Decoding Acceleration

Techniques that produce more useful tokens per forward pass: speculative decoding, the tooling to train drafters, and fast constrained decoding.

22 entries · 3 subsections

Editor’s pick

VI.1 Speculative Decoding 11

  1. Fast Inference from Transformers via Speculative Decoding Paper

    Introduced draft-then-verify decoding with an acceptance rule that leaves the target model's output distribution unchanged.

    ICML 2023

  2. EAGLE-3 Paper

    Predicts tokens instead of features and fuses low-, mid-, and high-layer target features via training-time test, so drafters keep improving with more data.

    NeurIPS 2025 · Code

  3. Accelerating Large Language Model Decoding with Speculative Sampling Paper

    Concurrent DeepMind derivation of draft-and-verify decoding with a modified rejection sampler, evaluated on Chinchilla 70B.

    arXiv 2023

  4. SpecInfer Paper

    Organizes draft candidates into a token tree and verifies all branches in one pass with tree attention, the basis of tree-based speculation.

    ASPLOS 2024 · Code

  5. Medusa Paper

    Adds extra decoding heads to the target model that propose several future tokens, checked together with tree attention, with no separate drafter.

    ICML 2024 · Code

  6. EAGLE Paper

    Drafts at the feature level, with a light head that extrapolates the target's second-to-top-layer hidden states given the sampled token.

    ICML 2024 · Code

  7. Better & Faster Large Language Models via Multi-token Prediction Paper

    Trains several output heads on a shared trunk to predict future tokens at once; the extra heads double as self-speculative drafters.

    ICML 2024

  8. SuffixDecoding Paper

    Model-free drafting from suffix trees over prompts and earlier outputs, aimed at repetitive agent workloads; vLLM's suffix method calls this code.

    NeurIPS 2025 · Code

  9. P-EAGLE Paper

    Turns EAGLE into a parallel drafter that proposes several tokens per forward pass, with a training scheme that scales to long reasoning sequences.

    NeurIPS 2026

  10. DFlash Paper

    Uses a small block-diffusion model, conditioned on target-model features, to draft a whole block of tokens in one pass; DFlash 2 followed.

    ICML 2026 · Code

  11. Spec-Bench Benchmark

    Shared harness that compares speculative decoding methods on the same model and GPU across chat, translation, summarization, QA, math, and RAG.

    maintenance · Apache-2.0 · 416 stars · Updated 2025-04

VI.2 Drafter Training 4

  1. SpecForge Library

    SGLang team's framework for training EAGLE-3, P-EAGLE, and DFlash drafters online or offline, producing checkpoints that SGLang serves directly.

    MIT · 1.3k stars · Updated 2026-11

  2. Speculators Library

    Generates target hidden states with vLLM, trains EAGLE-3, P-EAGLE, DFlash, and DSpark drafters, and stores them in a format vLLM loads as-is.

    Apache-2.0 · 976 stars · Updated 2026-11

  3. TorchSpec Library

    Disaggregated drafter training that streams target hidden states from inference engines to trainers through Mooncake instead of writing them to disk.

    MIT · 268 stars · Updated 2026-11

  4. EAGLE (official code) Library

    Authors' training and inference code with released draft weights for EAGLE-1, EAGLE-2 dynamic draft trees, and EAGLE-3.

    Apache-2.0 · 2.6k stars · Updated 2026-02

VI.3 Structured Outputs & Constrained Decoding 7

  1. XGrammar Library

    Grammar engine that prechecks context-independent tokens to build masks cheaply; XGrammar-2 adds tag-triggered structures for tool calls.

    Apache-2.0 · 2k stars · Updated 2026-11

  2. llguidance Library

    Rust engine pairing a regex-derivative lexer with an Earley parser to compute token masks per step; a backend in vLLM, SGLang, and llama.cpp.

    MIT · 919 stars · Updated 2026-11

  3. Outlines Library

    Python library that constrains generation to JSON Schema, regex, or grammars across local models and hosted APIs.

    Apache-2.0 · 16k stars · Updated 2026-09

  4. Efficient Guided Generation for Large Language Models Paper

    Compiles regexes and grammars into finite-state machines and precomputes an index over the vocabulary so each masking step is cheap.

    arXiv 2023 · Code

  5. Guidance Library

    Python programming model that interleaves prompts, generation, and grammar constraints in one program, with llguidance as its engine.

    MIT · 22k stars · Updated 2026-05

  6. LM Format Enforcer Library

    Enforces JSON Schema or regex output by walking a character-level parser alongside the tokenizer prefix tree; also a vLLM backend.

    MIT · 2k stars · Updated 2026-04

  7. JSONSchemaBench Benchmark

    Real-world JSON Schemas for comparing constrained-decoding engines on coverage, speed, and output quality, plus MaskBench for mask latency.

    104 stars · Updated 2026-09