AdaSpark: Adaptive DSpark with Online Learning for Tree Verification and N-gram Fill
cs.LG, cs.CL
Submitted: 2026-10-05
Updated: 2026-10-05
Comments: 25 pages, 10 figures, 15 tables. Code: https://github.com/zeraix/imparo
Code: https://github.com/zeraix/imparo
License: http://creativecommons.org/licenses/by/4.0/
The gist: Block drafters such as DSpark propose ranked candidates for several positions in one forward pass, and a tree verifier checks them in one pass of the target.
Terminology
Abstract
Block drafters such as DSpark propose ranked candidates for several positions in one forward pass, and a tree verifier checks them in one pass of the target. The number of rows to verify trades the tokens a wider tree is expected to accept against the time a wider verify takes. Most schedulers that choose this number take the verify time from a table or model measured before serving, corrected online by at most one scale factor, and take acceptance from the drafter's confidence estimates or from a map fitted offline. AdaSpark learns both quantities while it serves, with no profile, calibration or sweep in advance. It learns which verify widths are worth offering and fits each one's verify time as a function of context. It fits each candidate's acceptance probability to the target's verify outcomes, with the drafter's confidence head as one input, and orders and sizes the tree by that fit instead of by the head. The same model prices n-gram continuations of the request's own text, so drafted and text-derived candidates compete for rows in one best-first order. The width is chosen by pricing time at the long-run decode rate. On single- and multi-turn conversations from six public datasets, on three dense targets and one mixture-of-experts target, AdaSpark decodes 1.5-3.1x faster than llama.cpp's DSpark with the same drafters. Our imparo engine with AdaSpark is 1.17-1.52x faster than imparo running with a three-token chain (the default llama.cpp setting); this gain comes from the scheduler alone. Without a width sweep, AdaSpark is never more than 0.3% slower than the best pinned tree width on any dense target or context band. On the mixture-of-experts target it ties the best pinned width, and the other pinned widths from 4 to 16 rows are 5-14% slower.
Sources
- Accelerating Large Language Model Decoding with Speculative Sampling
- SpecInfer: Accelerating Generative Large Language Model Serving with Tree-based Speculative Inference and Verification
- EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees
- OPT-Tree: Speculative Decoding with Adaptive Draft Tree Structure
- DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation
- TreeSpark: Calibrated, Load-Adaptive Draft Trees for Semi-Autoregressive Speculative Decoding
- From Chains to Trees: Parent-Conditioned Drafting for Semi-Autoregressive Speculative Decoding
- Draft Less, Retrieve More: Hybrid Tree Construction for Speculative Decoding
- TALON: Confidence-Aware Speculative Decoding with Adaptive Token Trees
- AdaptiveSD A Stability-Aware, Runtime-Adaptive Speculative Decoding Framework with Multi-Policy Orchestration for CPU-Constrained LLM Inference
- BanditSpec: Adaptive Speculative Decoding via Bandit Algorithms
- Delay-Adaptive Speculation Control for Low-Latency Edge-Cloud LLM Inference
- Utility-Driven Speculative Decoding for Mixture-of-Experts
- Efficient Memory Management for Large Language Model Serving with PagedAttention
- Making Every Verified Token Count: Adaptive Verification for MoE Speculative Decoding
- SGLang: Efficient Execution of Structured Language Model Programs
- Bastion: Budget-Aware Speculative Decoding with Tree-structured Block Diffusion Drafting
- SpecDec++: Boosting Speculative Decoding via Adaptive Candidate Lengths
- TAPS: Target-Aware Prefix Tree Selection for Diffusion-Drafted Speculative Decoding
- Lossless but Not Free: An Empirical Anatomy of Speculative Decoding on Consumer Hardware
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks