ValuSpec: Plug-and-Play Candidate Valuation before Target Verification for Tree-Based Speculative Decoding

Liang He, SiYuan Ma, Qishi Zhan, Yongqi Fan, Mingyu Cao, Qizhen Lan, Zhaolu Kang, Xilu WangNeurIPS 2026

TL;DR

Generating text with massive language models one word at a time is notoriously slow, and while speculative decoding speeds things up by guessing multiple words ahead, those guesses are often bloated with terrible options that waste compute during verification. ValuSpec acts as a fast, training-free "bouncer" that stands right in front of the main model, filtering out low-quality candidate branches before they ever burn precious GPU cycles. By pruning the junk without altering a single word of the final output, it speeds up inference by up to 2.78×.

What Problem Does This Paper Address?

Standard Large Language Models (LLMs) generate text autoregressively—one token at a time, requiring a massive forward pass for every single word. Speculative decoding breaks this bottleneck: a tiny, fast "draft" model guesses a tree of possible future token sequences, and the massive "target" model verifies the whole tree in parallel in a single pass.

To avoid drafting the same common phrases over and over across different users, modern systems often use retrieval-based methods—pulling historical text fragments from a database to build candidate trees. Here’s the catch: as that database grows, the retrieved trees get bloated with branches that match the prompt superficially but quickly veer off from what the target model actually wants to say.

Speculative decoding bottleneck where deviated candidates waste verification compute

Even though the target model checks candidates in parallel, verifying a giant tree full of dead-end branches still wastes substantial compute budget. As candidate length grows, the acceptance hit rate plummets monotonically:

Throughput, speedup, and declining acceptance hit rate as draft length increases

Once generating candidates becomes cheap, the real system bottleneck shifts: which candidates are actually worth verifying?

Methods

Most existing research tries to build better candidate trees on the generation side. ValuSpec does something orthogonal: it leaves tree generation completely untouched and inserts a plug-and-play valuation step right before target verification.

Here is how it works:

  1. Supply: An upstream method (like database retrieval or a dynamic tree builder like EAGLE-3) hands over a candidate tree.
  2. Transfer-Based Calibration (The Novel Twist): Instead of guessing a heuristic cutoff score (like raw entropy), ValuSpec aligns a tiny, frozen scoring model (e.g., a 68M parameter LLaMA) with the massive target model—without training any weights. On a calibration dataset, the authors let the target model generate its natural greedy outputs. They then ask the tiny valuation model to score those exact target trajectories (using mean log-probability) and set a filtering threshold ($\tau_{\text{tr}}$) at a low quantile (e.g., the 5th percentile) of those scores. Essentially, it learns: "How much does the tiny model usually like the big model's actual answers?"
  3. Filter & Verify: At runtime, any candidate branch scoring below $\tau_{\text{tr}}$ gets axed. The purified, compact subtree goes to the target model for standard parallel tree verification. If the filter accidentally prunes everything, the system safely falls back to a standard single-token greedy step. Because the target model still makes the final call under greedy rules, the output is mathematically guaranteed to be 100% identical to standard decoding.

Datasets

The authors do not introduce new benchmarks, opting instead to evaluate across four established datasets covering diverse generation patterns:

  • HumanEval: Python code generation (164 problems).
  • GSM8K: Multi-step arithmetic reasoning.
  • Dolly: Open-ended instruction following.
  • SpecBench: A multi-task benchmark specifically designed for speculative decoding (used in dynamic-tree experiments).

To simulate realistic recurring workloads, datasets are split 70% for threshold calibration and 30% for disjoint evaluation.

Key Insights and Ideas

  • Supply and Valuation are Complementary: You might assume an advanced dynamic tree builder like EAGLE-3—which already shapes and prunes candidates during generation—wouldn't need a post-hoc filter. Surprisingly, EAGLE-3's unpruned acceptance rates hover around 48%–71%. Slapping ValuSpec on top pushes acceptance of retained branches past 86%, proving generation-side pruning and verifier-side valuation solve distinct redundancies.
  • Thresholds Generalize Across Domains: You don't need to recalibrate for every task. A threshold calibrated strictly on Python code (HumanEval) transfers seamlessly to math word problems (GSM8K) and open-ended chat (Dolly) with almost zero loss in speedup. It captures an intrinsic relationship between the small scorer and the target model, rather than overfitting to a specific topic.
  • Universal Cutoffs Fall Short: Sweeping fixed likelihood thresholds (from 0.3 to 0.8) consistently underperforms ValuSpec's target-calibrated threshold across every tested setup.

Key Results

Tested on NVIDIA A100 GPUs across Llama-2 (7B/13B), Llama-3.1-8B, and Qwen3.5-9B, ValuSpec delivers substantial end-to-end wall-clock gains while maintaining exact output equivalence:

  • Retrieval-Based Trees: Achieves 2.18×–2.31× speedup over standard autoregressive (AR) decoding on Llama-2-7B, and 2.24×–2.38× on Llama-2-13B (jumping from 33.61 tok/s with standard Retrieval SD to 46.18 tok/s on HumanEval).
  • Dynamic Trees (EAGLE-3): Adds a 1.35×–1.52× marginal speedup directly on top of EAGLE-3 on Llama-3.1-8B, culminating in up to 2.78× total speedup over AR (98.25 tok/s vs. 35.30 tok/s on GSM8K).
  • Low Error Rates: Across Qwen3.5 tests, ValuSpec retains ~73%–88% of branches while keeping "false discards" (throwing away a valid branch) below 2% and empty-tree fallbacks below 1.4%. Speedups also hold up under batched inference (batch sizes 4 and 8).

Limitations and Future Work

  • Greedy Decoding Only: ValuSpec currently relies on deterministic greedy decoding ($T = 0$). Extending this valuation framework to stochastic sampling (temperatures $> 0$) is left for future work.
  • Upstream Dependence: Because ValuSpec only cleans up residual redundancy, its magic fades if an upstream supplier already outputs hyper-selective trees or if the workload has very little reusable structure.
  • Scoring Overhead in Production: Running the lightweight valuation model adds a tiny extra step before verification. While beneficial up to batch size 8 in PyTorch, deeper profiling inside heavy-duty production serving engines (like vLLM or TensorRT-LLM) remains an open next step.

Summary updated

Abstract

Tree-based speculative decoding accelerates large language model inference by verifying multiple candidate branches in parallel. However, in practical serving scenarios, similar requests repeatedly induce overlapping candidate branches. While retrieval-based methods mitigate this by reusing historical drafts, the resulting candidate trees often contain many low-quality branches as the candidate tree grows, which reduces verification efficiency and wastes target-side computation. To address this, we propose ValuSpec, a plug-and-play candidate valuation mechanism that filters low-quality branches from a supplied candidate tree before expensive target-side verification. ValuSpec introduces transfer-based supervision to align filtering with the target model's behavior. A filtering threshold is estimated from the target model's greedy trajectories on a calibration split, without any parameter training. The target model then verifies the filtered tree under the output-identical greedy rule, so accepted tokens are guaranteed to match standard autoregressive decoding exactly. Experimental results on HumanEval, GSM8K, Dolly, and SpecBench show that ValuSpec achieves up to 2.38× end-to-end speedup in retrieval-based tree settings. Furthermore, integrating ValuSpec into the EAGLE-3 dynamic tree framework yields up to 2.78× end-to-end speedup without modifying its tree construction strategy, demonstrating that ValuSpec serves as a generally applicable and plug-and-play candidate valuation module.
BibTeX
@inproceedings{he2026valuspec,
  author = {Liang He and SiYuan Ma and Qishi Zhan and Yongqi Fan and Mingyu Cao and Qizhen Lan and Zhaolu Kang and Xilu Wang},
  title = {{ValuSpec: Plug-and-Play Candidate Valuation before Target Verification for Tree-Based Speculative Decoding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=EBfu12MEOf},
}

Loading related content...

Figure