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

Cactus: Accelerating Auto-Regressive Decoding with Constrained Acceptance Speculative Sampling

Yongchang Hao, Lili Mou

TL;DR

Cactus (Constrained Acceptance Speculative Sampling) is a new, training-free method that accelerates Large Language Model (LLM) inference by up to 1.9x while maintaining high output quality. By reformulating speculative sampling as a constrained optimization problem, Cactus allows for a mathematically controlled divergence from the original model's distribution. This effectively trades a tiny, bounded amount of "fidelity" for a significant boost in decoding speed.

The Bottleneck in LLM Inference

Generating text with LLMs is notoriously slow because the process is "memory-bound." Every single generated token requires loading hundreds of billions of parameters from memory to the processor.

Speculative Sampling (SpS) attempts to solve this by using a tiny, efficient "draft" model to guess several tokens ahead. A larger "verifier" model then checks these guesses in a single forward pass. However, standard SpS is strictly "lossless"—it forces the final output to match the verifier's distribution exactly.

In many real-world applications, this strictness is unnecessary. A slightly different but still high-quality distribution (similar to using top-$k$ or temperature sampling) is perfectly acceptable. Existing "lossy" methods, like Typical Acceptance Sampling (TAS), improve speed by accepting more tokens but often suffer severe drops in output quality. They rely on heuristics that can cause "semantic drift," especially when the model is dealing with complex, high-entropy information.

The Cactus Approach: Principled Divergence

The authors of Cactus treat speculative sampling not as a strict matching game, but as a constrained optimization problem. Instead of trying to match the verifier distribution $q$ exactly, they look for a new target distribution $h$ that achieves two goals:

  1. Maximizes the acceptance rate: Making the draft model's guesses more likely to be accepted by the verifier.
  2. Stays close to the verifier: Keeping the Kullback-Leibler (KL) divergence between the new distribution and the original verifier distribution below a user-defined threshold, $\delta$.

Because the exact mathematical solution involves complex transcendental functions, the authors use a second-order Taylor expansion to derive a simple, closed-form approximation. The resulting Cactus algorithm essentially gives the draft token a "bonus" probability based on the verifier's confidence and the allowed divergence $\delta$.

Crucially, Cactus is entirely training-free. It requires only basic element-wise operations, making it incredibly lightweight and easy to implement on top of existing LLM serving frameworks.

Key Findings and Results

The researchers evaluated Cactus across several challenging benchmarks—including GSM8K (math), IFEval (instruction following), GPQA (expert-level science), and Spec-Bench—using model families like Qwen, Gemma, DeepSeek, and LLaMA.

Pushing the Pareto Frontier

Cactus consistently outperformed both standard SpS and the lossy TAS baseline, pushing the Pareto frontier of the accuracy-acceptance trade-off further than previous methods. On the challenging GPQA benchmark, where TAS often saw significant accuracy drops due to its "certainty bias" (favoring low-entropy, deterministic outputs), Cactus maintained robust accuracy while achieving higher acceptance rates.

Accuracy vs. Average Length across benchmarks. Cactus (red triangles) stays within the verifier's confidence range while achieving much higher average accepted lengths than SpS (blue circles).

Significant Speedups

By accepting more tokens without breaking the distribution, Cactus achieved nearly 1.9x speedup over standard autoregressive decoding in certain configurations, proving highly efficient across different model sizes and draft lengths.

Wall-time normalized throughput showing Cactus achieving nearly 1.9x speedup over standard decoding baselines.

The "Healthy Ensemble" Effect

Surprisingly, Cactus sometimes outperforms the original verifier model in raw accuracy. The authors hypothesize that by allowing a small, controlled divergence toward the draft model, Cactus creates a beneficial ensemble effect, combining the strengths and smoothing the distributions of both models.

Limitations and Future Work

While highly effective, the authors note a few areas for future exploration:

  • Hyperparameter Tuning: While a divergence threshold of $\delta=1$ works well as a default, the optimal setting might vary depending on a specific task's sensitivity to exact phrasing.
  • Draft Model Alignment: The method assumes the draft and verifier models share the same vocabulary and tokenization. If they do not, additional mapping layers are required.
  • Scaling Up: Evaluations were capped at 32B parameter models. Future work could explore how these "principled losses" behave with trillion-parameter models or in multi-drafter setups.
  • System Integration: Combining Cactus with advanced KV cache optimizations (like quantization or paging) could yield even greater system-level throughput in production environments.

Summary updated

BibTeX
@inproceedings{hao2026cactus,
  author = {Yongchang Hao and Lili Mou},
  title = {{Cactus: Accelerating Auto-Regressive Decoding with Constrained Acceptance Speculative Sampling}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=lpUIkCAy9p},
}
Figure