PACER: Blockwise Pre-verification for Speculative Decoding with Adaptive Length

Situo Zhang, Yifan Zhang, Zichen Zhu, Hankun Wang, Da Ma, Danyang Zhang, Lu Chen, Kai YuarXiv 2026

TL;DR

Standard speculative decoding accelerates large language model (LLM) inference by using a fixed-length sequence of draft tokens, but this static approach wastes computation when the draft model struggles or stops too early when it excels. To solve this, PACER introduces a lightweight, trainable pre-verification layer that dynamically adjusts the draft length block-by-block. This adaptive approach delivers up to a 2.66× speedup over standard autoregressive decoding, which jumps to 3.09× when paired with advanced drafting techniques like Ouroboros.

What Problem Does This Paper Address?

Large language models are notoriously slow during inference because they generate text autoregressively—one token at a time. This process is heavily memory-bound: every single token generation requires loading billions of model parameters from high-bandwidth memory to the GPU cache, leaving the GPU's computational cores vastly underutilized.

Speculative Decoding (SD) mitigates this by using a tiny, fast "draft" model to guess a sequence of $\gamma$ tokens (the window size). The large "target" model then verifies these tokens in a single, parallel forward pass.

However, standard SD uses a fixed window size. The authors show that the optimal draft length actually varies wildly from step to step. If the window is too small, the draft model stops prematurely, missing opportunities for longer jumps. If it's too large, the draft model wastes compute generating tokens that the target model will inevitably reject.

Figure 2: (a) Maximum acceptance lengths across decoding steps. The optimal fixed window size (γ = 9) is marked by the red horizontal line. Significant variation in acceptance lengths highlights the inefficiency of employing a fixed draft window size. (b) Comparison between speculative decoding using the optimal fixed window (γ = 9) and optimal dynamic window size (γ⋆). Utilizing dynamic draft lengths substantially reduces forward passes for both draft and target models, leading to increased decoding speed (tokens/s).

Methods

The authors propose PACER (Blockwise Pre-verification for Speculative Decoding with Adaptive Length), which dynamically regulates the draft window size using a lightweight, single-layer Transformer module.

Instead of generating all draft tokens at once or checking them one by one (which introduces too much latency overhead), PACER operates blockwise:

  1. Block Generation: The draft model generates a small block of $b$ tokens (e.g., 3 or 4 tokens).
  2. Pre-verification: PACER’s trainable layer evaluates the hidden states of these new tokens, combined with positional embeddings and prior context, to estimate their acceptance probabilities.
  3. Adaptive Halting: If the average predicted acceptance rate for the block falls below a threshold $t$, drafting halts immediately, and the tokens are sent to the target model. If it passes, the draft model generates the next block.
  4. Dynamic Thresholding: To prevent unbounded draft generation, the threshold $t$ is multiplied by a growth factor $\rho > 1$ after each block, making it progressively stricter at later positions.
Figure 1: Comparison of the speculative decoding (SD) process for PACER and vanilla SD with fixed small and large window sizes. (a) PACER generates drafts in blocks of size b = 3, performs three rounds of pre-verification, and produces a total of 9 draft tokens, of which 7 are accepted with only one target model forward pass. (b) Vanilla SD with a small window size (γ = 2) causes the draft model to stop prematurely, resulting in 3 costly target forward and 6 draft forward. (c) Vanilla SD with a large window size γ = 9 generates 9 draft tokens, but only 2 are accepted, leading to wasted draft computation.

Datasets

PACER was trained and evaluated across diverse text-generation tasks:

  • Training: Labeled data was generated using the CodeAlpaca dataset (~20,000 instruction-response pairs), where draft tokens were labeled as accepted (1) or rejected (0) based on actual target model alignment.
  • Evaluation Benchmarks:
  • Code Generation: HumanEval and MBPP
  • Mathematical Reasoning: GSM8K
  • Document Summarization: CNN/DailyMail (CNN/DM)
  • General Capabilities: SpecBench

Key Insights and Ideas

  • The Positional Decay of Acceptance: The authors observed a sharp, exponential decline in token acceptance rates as the draft position increases (see Figure 6 in the paper). Tokens generated later in a draft sequence are inherently less reliable. PACER leverages this by incorporating explicit draft position embeddings into its pre-verification layer.
  • Amortizing Overhead via Blocks: Verifying tokens individually adds too much sequential overhead. By grouping tokens into blocks (e.g., size $b=3$ or $4$), PACER strikes an ideal balance between fine-grained control and computational efficiency.
  • The Power of the Mean: Stricter halting criteria—such as stopping when any single token falls below a threshold—cause premature termination due to occasional low-confidence tokens. Averaging the probabilities across the block (mean-token probability) proved to be the most robust halting metric.

Key Results

PACER was evaluated using several state-of-the-art model families, including DeepSeek-Coder (1.3B/33B), Qwen-2.5 (1.5B/32B), and Llama-2 (7B/70B).

  • Speedups: PACER consistently outperformed vanilla speculative decoding across all datasets. On HumanEval using Llama-2 7B/70B, PACER achieved a 2.66× speedup over autoregressive decoding.
  • Orthogonality & Integration: When integrated with Ouroboros (a method that uses an n-gram pool to improve draft quality), PACER pushed the performance envelope further, reaching a 3.09× speedup on the GSM8K dataset.
  • Minimal Overhead: Despite adding an extra neural network layer, PACER's pre-verification module is incredibly lightweight, accounting for only 1.3% to 2.1% of the total inference time.

Limitations and Future Work

While PACER successfully adapts draft lengths, its efficiency remains bound to the baseline quality of the draft model. For tasks like document summarization (CNN/DM), where the optimal draft lengths are inherently short due to the complexity of the task, the potential speedup gains are naturally constrained. Additionally, when dealing with very small target models, the relative overhead of the pre-verification layer becomes more noticeable.

Future work includes exploring how PACER can be combined with advanced draft-tree structures or self-drafting mechanisms to further optimize token verification.

Summary updated

BibTeX
@misc{zhang2026pacer,
  author = {Situo Zhang and Yifan Zhang and Zichen Zhu and Hankun Wang and Da Ma and Danyang Zhang and Lu Chen and Kai Yu},
  title = {{PACER: Blockwise Pre-verification for Speculative Decoding with Adaptive Length}},
  year = {2026},
  eprint = {2602.01274},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.01274},
}
Figure