Reference-Compatible Parallel Execution for Quantized LLM Inference
Chengzhan Li
原文摘要
Batching a quantized large language model (LLM) can change full-vocabulary outputs and the key-value (KV) cache even when token positions and causal masks are unchanged. We introduce reference-derived phase plans: per-call execution descriptions that preserve a fixed deployment's producer, physical attention range, arithmetic and state ownership while exposing parallel work. Whole-graph plans split the complete computation at compatibility boundaries; local-attention plans split only attention and retain wider projection and feed-forward work. Independent arithmetic groups can also be packed into one operation without changing each group's reduction. We implement and qualify these paths on CUDA and Vulkan for Qwen, Llama and SmolLM2. On Linux/RTX A5000, compatible speculative execution reduces resident-service time by 17.21 percent, 25.54 percent and 11.52 percent relative to the fastest measured fixed target-only control for Qwen3-8B, Qwen3-14B and Llama-8B. Balanced experiments isolate an increment of 0.80 to 1.64 percent from Q8 projection packing and smaller, geometry-dependent gains from local cuts. For Qwen3-32B with mixed Q4_K/Q6_K weights, independent-channel grouping reduces ordinary service time by 5.61 percent against a graph-level scalar-column loop. Equal-work tests favor eight-query execution in aggregate, whereas complete live requests favor shorter proposals because longer proposals increase target work. The results show how to exploit known-query parallelism within an established numerical reference and how complete-request costs determine the useful execution strategy.
cs.PF