arXiv:2610.03228 · v5
Reference-Compatible Parallel Execution for Quantized LLM Inference
摘要
Batching can change a quantized language model's logits even when token positions and causal masks are unchanged. We present a method for executing known queries in parallel while retaining the numerical behavior of a scalar deployment fixed before optimization. The method derives physical KV-prefix and backend arithmetic requirements, groups compatible queries, and keeps independent projection work batched. On CUDA, it packs independent four-column reductions into a broadcast batch without widening the reference-sensitive reduction. On Vulkan, it preserves projection activation arithmetic and extends a scalar attention path across query groups. Controlled interventions and frozen-input studies cover Llama, Qwen and SmolLM2. CUDA packing reduces complete resident-service time by 4.00% on four fresh inputs. Vulkan batched attention reduces ordinary-request time by 32.34% versus per-query attention and 52.87% versus scalar execution on twelve fresh inputs. Equally optimized whole-graph boundary cuts match local grouping on aligned natural prefill and outperform it at some wider Vulkan query sizes. At deliberately crossing CUDA appends, local grouping gives a $1.307\times$ speedup over whole-graph cuts; this conditional result is not a workload-average speedup. These results identify how numerical compatibility constrains parallel execution and how width and alignment determine the benefit of local cuts.
作者备注:14 pages, 7 figures; includes 4-page supplementary material. Revised title and exposition; CUDA reduction packing, Vulkan structural transfer, and whole-graph batching comparisons. Clarified related work and improved typography