Phase-Scoped Query Layouts for Reference-Constrained Speculative Decoding
Abstract
Speculative verification changes the execution geometry of a quantized target model and can change its greedy output. We present phase-scoped query-to-batch (QB) attention, a graph transformation that pairs query and mask views, shares key/value storage, and retains batched projections and feed-forward computation. Phase-aware dispatch and layout-sensitive graph reuse bind the transformation to the native speculative transaction. In a six-session CUDA study, QB reduces request latency relative to explicit per-query attention (PQ) by 3.06%, 6.17% and 2.83% for Qwen3, SmolLM2 and Llama; a 72-context replay finds bitwise correspondence at QK, softmax and AV. A matched seven-arm study shows that local rather than global repair changes draft profitability for two families. A prospective transfer study then tests 36 model/input cells drawn from 21 previously unused tasks. SmolLM2 preserves the reference on its complete panel and obtains a 6.99% layout reduction; Qwen3's 3.22% estimate is noise-limited. On a 737-token Llama input, PQ and QB agree with each other but differ from the deployed reference, separating local numerical correspondence from end-to-end preservation. Vulkan state interventions and a scoped AV-preserving port identify producer-state and backend obligations. Complete-service studies further distinguish representation savings from the net value of drafting. The results establish a local execution method with measured cost benefits and distinguish its numerical, stateful and complete-cost conditions for deployment.