NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Speculative Decoding with CTC-based Draft Model for LLM Inference Acceleration

Zhuofan Wen, Shangtong Gui, Yang Feng

TL;DR

Researchers have developed CTC-drafter, a novel speculative decoding framework that uses Connectionist Temporal Classification (CTC) to speed up Large Language Model (LLM) inference. By allowing the draft model to predict sequences with "blank" and repetitive tokens, the system captures better correlations between tokens, leading to higher acceptance rates and inference speedups of up to 2.78x over standard generation.

The "Autoregressive Tax" in LLMs

Large Language Models (LLMs) are notoriously slow because they generate text autoregressively—predicting one token at a time, with each new token requiring a full pass through the massive model.

Speculative decoding is a popular solution to this bottleneck. It uses a small, fast "draft" model to guess the next few tokens. The large "base" model then verifies these guesses in a single parallel step. If the guesses are correct, the model jumps ahead several steps at once.

However, most current draft models predict future tokens independently (non-autoregressively). While fast, they often produce incoherent sequences that the base model ultimately rejects. This paper tackles the "acceptance rate" problem: how do we make the draft model smarter and more coherent without sacrificing its speed?

Introducing CTC-drafter

To address this, the authors introduce CTC-drafter, which applies the Connectionist Temporal Classification (CTC) algorithm—traditionally used in speech recognition—to LLM speculative decoding.

CTC-drafter Architecture

The framework operates through several key components:

  1. Attention Draft Module: Instead of a completely separate model, a single transformer layer is added on top of the base model’s existing hidden states to predict multiple future tokens in parallel.
  2. CTC Loss: Unlike standard models that use token-by-token cross-entropy, CTC-drafter is trained using a sequence-level CTC loss. This allows the model to predict "blank" tokens ($\epsilon$) or repeat tokens. During training, the model considers all possible "alignments" (sequences of tokens and blanks) that could result in the correct target sentence.
  3. CTC Transform Module: Before the base model verifies the draft, this module "cleans" the sequence by removing blanks and merging consecutive identical tokens. This allows the draft model to focus on the content and order of tokens rather than forcing a specific token into a rigid position.
  4. Knowledge Distillation: The draft model is trained to mimic the base model's output distribution using the ShareGPT dataset, ensuring the drafter learns the base LLM's style.

Key Insights

  • The Power of "Blanks": By introducing blank tokens, the draft model doesn't have to commit to a specific token at every single position. This flexibility allows the model to better capture dependencies between words.
  • Sequence-Level vs. Token-Level: Standard non-autoregressive models treat each position as an independent coin flip. CTC-drafter treats the entire draft as a single coherent unit, significantly boosting the probability that the base model will accept the sequence.
  • Efficiency via Integration: By piggybacking on the base model's hidden states, the draft model remains extremely lightweight, adding minimal computational overhead.

Performance and Results

The authors evaluated CTC-drafter against popular baselines like Medusa and Hydra across various Vicuna and LLaMA-2 models using the MT-bench and GSM8K datasets.

Performance Comparison Table
  • Speedup: On the Vicuna-7B model (MT-bench), CTC-drafter achieved a 2.78x speedup compared to standard autoregressive decoding, outperforming Medusa (2.13x) and Hydra (2.36x).
  • Acceptance Rate ($\beta$): CTC-drafter consistently produced more "acceptable" tokens per step. For Vicuna-7B, it averaged 3.56 accepted tokens per step, whereas Medusa averaged 2.58.
  • Robustness: The method showed strong performance even on the math-heavy GSM8K dataset, achieving a 2.66x speedup on Vicuna-13B.

Limitations and Future Work

While highly effective, the framework has limitations. As the base model gets larger (e.g., moving from 7B to 33B parameters), the "ability gap" between the base model's intelligence and the small draft model's capacity grows, leading to a slight decline in the average number of accepted tokens. Additionally, the CTC Transform and complex draft strategy add minor latency, which could offset speed gains for very small base models.

Future work may explore more complex verification criteria, such as Nucleus Sampling, and investigate other sequence modeling techniques like Conditional Random Fields (CRF) to further refine the drafting process.

Summary updated

BibTeX
@inproceedings{wen2024speculative,
  author = {Zhuofan Wen and Shangtong Gui and Yang Feng},
  title = {{Speculative Decoding with CTC-based Draft Model for LLM Inference Acceleration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=pGeAcYhnN5},
}
Figure