TL;DR
When large language models process massive contexts, their memory footprint overflows GPU capacity into host RAM, turning the slow PCIe data cable into a crippling bottleneck. SplitVerify breaks this logjam during speculative decoding by keeping part of that memory right where it lives—having the host CPU compute attention in place while simultaneously streaming the remaining data to the GPU. The result is up to 4.3× faster long-context text generation with zero loss in model accuracy.
What Problem Does This Paper Address?
Every token an LLM generates requires looking back at all previous tokens, whose intermediate states are stored in a KV cache (key-value cache). At 128,000 tokens, this cache balloons to tens of gigabytes, easily overflowing a GPU’s onboard memory. The standard fix is offloading the cache to the server's spacious host RAM (DRAM).
Unfortunately, to generate just one new token, the GPU must drag that entire multi-gigabyte cache across the narrow PCIe bus—slowing Llama-3.1-8B down to a sluggish ~1.5 tokens per second.
Prior work offers two flawed escape hatches:
- Approximate attention: Only read a fraction of the cache. It’s fast, but the model forgets things and loses accuracy.
- Speculative decoding: A lightweight "drafter" guesses the next $\gamma$ tokens, and the main model verifies them all in a single pass, amortizing the PCIe transfer across several tokens.
Yet even exact speculative systems still haul every single byte over PCIe while the server's powerful host CPU sits completely idle—despite being able to read host RAM 6 to 12× faster than PCIe can transfer it! Why move the mountain to the GPU when the CPU is already standing on it?
Methods
SplitVerify is a drafter-agnostic verification engine that divides each layer's offloaded KV cache between the host CPU and the GPU, running both paths in parallel.
- In-Place Multi-Query CPU Attention: Standard single-token decoding on a CPU is hopelessly memory-bound. However, verifying $\gamma$ drafted tokens means checking $\gamma+1$ positions at once. The authors wrote custom C++ kernels (using AVX2/AVX-512) that scan a KV block from RAM once and reuse it across all $(\gamma+1)$ positions and grouped query heads simultaneously, putting idle CPU arithmetic units to work.
- Parallel Split & Exact Merge: For $N$ offloaded tokens, the CPU computes attention on tokens $[0, x)$ in local NUMA-sharded memory while tokens $[x, N)$ stream from pinned memory over PCIe to the GPU (alongside a tiny GPU-resident window of recent/sink tokens). The GPU then combines these partial attention outputs using the log-sum-exp identity—the exact same mathematical trick FlashAttention uses to stitch tiles together. No approximations, no lost accuracy.
- Dynamic Cost Model: A lightweight linear model predicts CPU compute time and PCIe transfer time to find the sweet spot $x^*$ where both finish at the exact same millisecond, updating its estimates online after every layer to adapt to memory contention.
Datasets
SplitVerify requires no training; it is evaluated on three established long-context benchmarks (no new datasets are introduced):
- PG-19: Book-length text continuations (32K to 128K tokens) for measuring raw decoding throughput.
- LongBench-v2: Real-world long-context questions (24K–32K and 96K–120K tokens) with variable-length chain-of-thought reasoning answers.
- RULER: A 11-task synthetic retrieval and reasoning suite (at 64K and 128K tokens) to rigorously test exactness vs. cache compression.
Key Insights and Ideas
- Speculative verification flips CPU economics: Because reading from RAM dominates CPU time, checking 8 extra draft tokens is practically free until the CPU's math units saturate. Meanwhile, PCIe transfer time is completely flat regardless of draft length $\gamma$. Neither path always wins—creating a crossover point governed by core count, PCIe speed, and model architecture.
- Splitting shines brightest when cores are scarce: If a single GPU monopolizes all 64–96 server cores, the CPU is often so fast that SplitVerify leaves nearly 100% of the work on the CPU. Splitting becomes crucial in realistic multi-GPU servers where each GPU only gets a fraction of the host cores (e.g., 16 or 24 cores), allowing PCIe and CPU to rescue each other.
- Save two cores for housekeeping: Reserving just two CPU cores—one for launching GPU kernels and one for the CUDA driver—prevents CPU attention threads from stalling GPU transfers, avoiding a surprising 40% latency penalty.
Key Results
Tested on A100 (PCIe Gen4) and H100 (PCIe Gen5) servers across Llama-3.1-8B, LWM-128K, Qwen3-32B, and Llama-3.1-70B at 128K context:
- Up to 2.5× faster decoding throughput than an equally tuned exact PCIe-streaming baseline (
SD+Offload) and a reimplementation ofSpecStream(reaching 38.7 tokens/s vs. 21.8 tokens/s on H100, and 28.7 tokens/s vs. 12.2 tokens/s on A100 for Llama-3.1-8B). - Up to 4.3× faster than
TriForce’s official code on its own evaluated model (LWM-Text-Chat-128K) using all cores, and 1.92× faster using just a 24-core share. - Zero accuracy drop: On RULER at 128K, SplitVerify matches full-GPU KV cache accuracy (83.9%), whereas lossy compressed caches (SnapKV) plummet to 63.8%–70.4%.
Limitations and Future Work
- Doubled host RAM footprint: Keeping both a NUMA-sharded copy (for fast local CPU reads) and a pinned copy (for fast GPU DMA streaming) doubles the host memory needed for the cache (e.g., 32 GiB instead of 16 GiB for Llama-3.1-8B at 128K).
- Prefill dilutes end-to-end gains: SplitVerify only accelerates decoding. When initial prompt processing (prefill) and setup times are included on a single 128K request, an impressive 1.87× decode speedup shrinks to 1.14× end-to-end.
- Hardware shifts: Next-gen ultra-fast interconnects (like NVLink-C2C on Grace Hopper or PCIe Gen6) and wider Grouped-Query Attention (GQA) shrink the CPU's advantage. Conversely, CPUs equipped with dedicated matrix-math hardware (like Intel AMX, absent on the tested AMD EPYC hosts) are a promising avenue that would push SplitVerify's performance even higher, alongside integrating chunked streaming for large-batch serving.
Summary updated