speeds up LLM inference by having a cheap model draft multiple tokens before by the target model. However, fixed configurations waste computation when token predictability changes. APEX is a learned controller that adapts both the drafting mechanism (EAGLE-3, n-gram, or draft model) per request and the draft depth per verification block.
Tested with Qwen3-8B across six workloads in vLLM, APEX achieves up to 5.24x speedup over autoregressive decoding. The high-speed APEX-S variant averages 4.27x speedup, while the balanced APEX-B variant achieves 3.27x speedup with 41% fewer wasted tokens compared to fixed n-gram speculation at depth 16. This shows that adaptive control can reduce waste without sacrificing performance.
The key insight is modeling accepted draft length as censored survival data, learning when drafts are likely to be rejected. This allows the controller to dynamically choose depths that maximize verified progress per unit cost, responding to changing generation conditions without modifying the target model.