Adaptive Planning and EXecution for speculative decoding: a learned controller that chooses which speculator to run for each request and how deep to draft at every verification block.
Speculative decoding speeds up LLM inference by letting a cheap drafter propose tokens that the target model verifies in one parallel pass. But the best drafter and the best draft depth shift from request to request, and from block to block within a request. Any fixed choice either leaves speed on the table or burns compute on tokens that get rejected.
APEX is a learned, two-level controller. APEX-Router picks a speculator (EAGLE-3, n-gram, or a draft model) and an initial depth for each request. APEX-Depth re-selects the draft depth after every verification block, trading speed against wasted tokens.
Integrated into vLLM and evaluated with Qwen3-8B on six workloads, APEX reaches up to 5.24× speedup over autoregressive decoding.
One controller works across different kinds of speculators and picks the right one for each request.
Draft length is re-chosen after every verification block, using live feedback from the verifier.
Acceptance is modeled as survival: APEX learns how likely a draft is to be rejected at each position, and learns from fully accepted blocks too.
A single learned utility balances throughput, accepted progress and rejected tokens when choosing what to do next.
The three share one architecture and differ only in the weights of the utility function, which set how much each one favors raw speed over avoiding wasted tokens.
For the survival model, utility, training objectives and full algorithm, read the paper.
Qwen3-8B served in vLLM, six workloads: code (MBPP, HumanEval), conversation (UltraChat-200k), long-chain reasoning (GPQA), long-context completion (The Stack Smol), software engineering (SWE-bench Lite), and math (GSM8K, AIME-style). Baselines are fixed-depth EAGLE-3, n-gram, and draft-model speculation at k ∈ {2, 4, 8, 16}.
| Method | Depth | Speedup ↑ | Waste % ↓ | WAS ↑ |
|---|---|---|---|---|
| EAGLE-3 | k=4 | 2.35× | 66.25 | 3.55 |
| EAGLE-3 | k=16 | 1.37× | 97.67 | 1.41 |
| n-gram | k=4 | 2.79× | 54.14 | 5.16 |
| n-gram | k=8 | 3.59× | 63.56 | 5.64 |
| n-gram | k=16 | 4.22× | 79.90 | 5.28 |
| Draft-SD | k=2 | 0.96× | 27.82 | 3.44 |
| APEX-S | adaptive | 4.27× | 55.30 | 7.73 |
| APEX-B | adaptive | 3.27× | 47.17 | 6.93 |
| APEX-E | adaptive | 1.83× | 63.69 | 2.87 |
Selected rows; the paper reports every mechanism at k ∈ {2, 4, 8, 16}. Waste % = rejected ÷ drafted tokens. WAS = speedup ÷ (waste % / 100).
Speedup / waste % / WAS for APEX-S and APEX-B on each workload. Open a workload to compare against every fixed configuration.
Ablations on a 120-request diagnostic subset (20 per workload). Removing the survival loss hurts waste most; removing verifier-history features hurts speedup most. The same pattern holds for all three profiles; APEX-B shown.
Restricting the candidate depths to k ≥ 3 raises speedup slightly but increases waste and lowers WAS for every profile. The shallow actions are doing real work.
[CODE coming soon.]
@article{jha2026apex,
title = {APEX: Speculate Smarter, Not Deeper},
author = {Jha, Manvi and Zhang, Zach and Xu, Zhichao and Liu, Linbo
and Jayanthi, Sai Muralidhar and Arannil, Vinayak},
journal = {arXiv preprint arXiv:2610.07780},
year = {2026}
}