When a long context's KV cache exceeds GPU memory capacity, it must be offloaded to host memory and transferred over PCIe, which often becomes the performance bottleneck. Speculative decoding amortizes this transfer cost across multiple drafted tokens. However, some existing systems either transfer the entire offloaded KV cache to the GPU for each verification step or perform approximate attention on the CPU. The former leaves the CPU underutilized, despite its ability to read KV cache 6-12 times faster than PCIe, while the latter compromises model accuracy. We observe that speculative decoding's verification phase creates an opportunity for efficient CPU attention by increasing memory reuse: verification processes $γ+1$ tokens at a time, allowing the CPU to reuse each fetched KV block across multiple query tokens. In this paper, we present SplitVerify, which partitions each layer's verification attention between the host CPU and GPU, allowing the CPU to attend to a portion of the offloaded KV cache in place. We develop a simple cost model to determine when CPU-GPU partitioning is beneficial and how to optimally divide attention computation between the two processors. Since SplitVerify modifies only the verification phase, it is compatible with any drafter and preserves exactness by computing full attention over the entire KV cache. On A100 and H100 servers with 128K-token contexts, SplitVerify achieves up to 2.5 times higher decoding throughput than our reimplementation of SpecStream and up to 4.3 times higher throughput than TriForce, using TriForce's own evaluated model.
翻译:暂无翻译