Summary (Overview)
- OasisKV is a memory-centric LLM inference system that decouples full KV-cache storage from HBM during decoding, keeping only the most relevant KV entries in HBM for attention computation.
- The system leverages lookahead tokens from speculative decoding (SD) to accurately predict future important KV blocks one step ahead, achieving >98.2% per-layer agreement with true next-token attention patterns.
- OasisKV implements a fully asynchronous prefetch pipeline with three stages (top-K prediction, KV selection, KV transfer) running on separate CUDA streams, hiding of-GPU memory transfer behind decode compute.
- The system achieves 1.69× throughput improvement over dense vLLM on real reasoning workloads with only 0.1 points of accuracy loss, and up to 2.1× on multi-GPU long-context serving.
- Under prefill-decode (PD) disaggregation, OasisKV's remote partial fetching reduces per-request KV admission by 6.5–9.7× and decode-node host memory by 2.2–2.6× compared to full KV transfer.
Introduction and Theoretical Foundation
The Memory Wall Problem
Large language model (LLM) inference is increasingly constrained by memory rather than compute. As agentic workloads grow (web-use, computer-use, coding agents), context lengths have increased over 10× compared to chatbot-era workloads. The key-value (KV) cache dominates both memory footprint and memory traffic during decode.
The KV footprint for a batch of requests with context length is:
The maximum decode batch size allowed by a GPU KV-cache budget is:
The linear dependence on makes long-context decoding fundamentally capacity-constrained. For a 32B-class GQA model with FP16/BF16 KV cache, per-token KV footprint is 256 KiB. At 32.7K average context tokens (production coding-agent trace), a single request requires ~8.6 GB of KV cache, limiting a nominal 80 GB HBM to only 9 concurrent requests.
Existing Approaches and Their Limitations
Three key KV-sparsity-based approaches exist:
- Sparse attention — reduces KV reads but does not reduce HBM capacity required
- KV retrieval — stages only active subset in HBM but places of-GPU transfers on the decode critical path
- KV prefetch — overlaps memory fetching with decode compute but is pinned against CPU-GPU IO bandwidth roofs
The fundamental constraint is the per-step byte budget:
where is effective inter-tier bandwidth and is available compute time. For Qwen3-8B on H100 with 2K active context, a decode step takes ≈17 ms, so a ≈64 GB/s PCIe link admits only ≈118 tokens of newly active KV per request per step.
Methodology
Look-ahead Attention
OasisKV leverages draft tokens from speculative decoding (EAGLE-3) to predict future KV access patterns. The key insight is that adjacent decoding steps exhibit strong temporal locality in block importance. By propagating the draft token over the normal token's sparse KV, the predicted top-K set agrees with the true next-token query's set above 98.2% in every layer (98.74% average).
The architecture consists of:
- Foreground: Processes normal and draft queries together over one resident KV working set
- Background: Draft query scans compressed key summaries (Quest-style min/max pooling) to rank all logical blocks independently for every KV head
- Compressed-key cache: Stores two summary vectors per block (coordinate-wise min/max), costing only 1/16 of full KV-cache size
Asynchronous Prefetch Pipeline
For a model with layers, the average interval between consecutive prefetch tasks is . The pipeline's steady-state completion interval is:
Three persistent background workers run on separate CUDA streams:
- Top-K prediction: Computes next step's top-K blocks
- KV selection: Compares predicted set with resident blocks, builds transfer plan
- KV transfer: Moves planned blocks from CPU to GPU
CUDA events preserve dependencies within each layer, allowing layer-local synchronization.
Delta Selection and Capped Eviction
To bound PCIe traffic, OasisKV uses a capped eviction policy:
- Intersect predicted and resident sets (resident blocks generate no traffic)
- Rank resident blocks outside predicted set by last-selected step
- Pair each admitted nonresident block with one eviction target (LRU-style)
- Admit at most pairs per decoding step per KV head
This bounds transfer to block-head entries across KV heads regardless of prediction drift.
Head-wise Memory Mapping
OasisKV adds a head-wise logical-to-logical mapping layer above existing GPU and CPU page tables. Each KV head maintains different sparse block sets, and the GPU pool holds a bounded working set while the CPU pool retains the full KV cache. Under tensor parallelism, each GPU updates mappings for its local KV heads independently without cross-GPU synchronization.
Remote Partial Fetching (PD Disaggregation)
For disaggregated serving:
- Partial transfer at admission: Sends only first-step selected KV blocks, compressed-key cache, and draft KV state — not the full KV cache
- Network prefetch at decode: Handles cache misses by fetching blocks from prefill node's staging pool, aggregated by layer across requests
Empirical Validation / Results
System Performance
Single-GPU (Qwen3-8B, H100):
- Up to 2.1× dense throughput (1,398 vs. 676 tok/s at 16K context)
- At moderate concurrency (16), improves both TPOT and throughput simultaneously
- Bounded 2,048-token working set supports 90–95 concurrent requests vs. 22 under dense
Multi-GPU (Qwen3-235B-A22B, TP8):
- Up to 1.9× throughput (1,102 tok/s)
- Overtakes dense at batch size 32 (16K) and 16 (32K)
PD Disaggregation:
- 2.1–2.3× throughput over dense (1,204 vs. 550 tok/s at 24K)
- RPF reduces per-request host memory to 1.54 GiB (vs. 3.38 GiB full transfer), 2.2× less
Accuracy Results
Table 1: Accuracy under 2,048-token KV budget (Δ vs. own stack's full attention)
| Dataset / Subset | Metric | Full (HF) | Quest | Δ | FreeKV | Δ | Full (vLLM) | Ours | Δ |
|---|---|---|---|---|---|---|---|---|---|
| Long input — Llama-3.1-8B, LongBench v2 | |||||||||
| Overall | 29.62 | 29.42 | -0.20 | 29.03 | -0.59 | 30.23 | 29.62 | -0.61 | |
| Long input — Qwen3-8B, LongBench v2 | |||||||||
| Overall | 32.21 | 31.61 | -0.60 | 31.01 | -1.20 | 33.60 | 33.20 | -0.40 | |
| Long output — Qwen3-8B, reasoning | |||||||||
| Overall | pass@k | 81.41 | 78.86 | -2.56 | 77.91 | -3.50 | 78.84 | 78.18 | -0.66 |
| avg@k | 69.48 | 66.65 | -2.83 | 66.85 | -2.63 | 67.63 | 67.28 | -0.35 | |
| AIME24 | pass@8 | 86.67 | 86.67 | 0.00 | 80.00 | -6.67 | 83.33 | 83.33 | 0.00 |
| AIME25 | avg@8 | 70.83 | 64.17 | -6.66 | 68.75 | -2.08 | 65.42 | 67.97 | +2.55 |
| GPQA-Diamond | avg@4 | 60.10 | 60.36 | +0.26 | 59.72 | -0.38 | 58.30 | 57.20 | -1.10 |
Fetch-Cap Ablation
Table 2: Fetch-cap ablation on Qwen3-8B (AIME24, LRU eviction). Dense attention scores 76.04 / 90.00.
| Fetch Ratio | Fetch (GB/step) | BW (GB/s) | TPS (tok/s) | AIME24 avg@32 | AIME24 pass@32 |
|---|---|---|---|---|---|
| 0.01 | 0.30 | 5.0 | 2,178 | 74.90 | 90.00 |
| 0.02 | 0.60 | 9.8 | 2,066 | 75.10 | 90.00 |
| 0.05 | 1.49 | 23.8 | 2,083 | 75.94 | 86.67 |
| 0.10 | 2.87 | 31.4 | 1,421 | 76.77 | 86.67 |
| 0.20 | 4.34 | 34.0 | 1,035 | 77.40 | 93.33 |
| Fetch all | 5.05 | 33.5 | 824 | 76.46 | 86.67 |
Key finding: Throughput is bounded by PCIe bandwidth, not attention compute. As the cap loosens, throughput collapses 2.6× while accuracy rises only modestly.
Remote Partial Fetching Benefits
- Admission traffic: 0.52 GiB (24K) and 0.46 GiB (32K) per request vs. 3.37 and 4.50 GiB full transfer — 6.5× and 9.7× reductions
- End-to-end traffic: 1.33× and 1.50× reduction when including decode-time drift
- Bandwidth distribution: RPF distributes traffic evenly (1–2% link idle time) vs. full transfer's bursty pattern (60% idle, 5.3 GB/s bursts)
- TTFT benefit: With 90% prefix-cache hit rate, RPF reduces TTFT by 2.0× at 24K and 2.2× at 32K over 100 Gbps link
Theoretical and Practical Implications
Design Requirements Established
-
Accurate lookahead, prefetched off the critical path: Prediction must be training-free, cheap, and accurate. Previous-token proxies recover true top-20 blocks unreliably with high layer variance; draft-token lookahead achieves >98% agreement.
-
Efficient sparse serving in production engines: Requires bounded, head-wise working sets on the paged KV pool, dense and sparse requests batched together, and per-step data movement within the decode-time budget .
-
Sparse staging across network and host tiers: Avoid materializing full KV cache in decode-node DRAM; apply sparsity to blocks transferred over network and materialized in host memory.
Key Insights
- Speculative decoding integration: OasisKV is inherently compatible with SD, reusing draft tokens that would otherwise be discarded. This opens a new design space for model-system co-design.
- Sparsity-accuracy tradeoff is manageable: Throughput swings 2.6× across fetch-cap settings while accuracy moves only 3 points, within run-to-run variance of dense.
- Memory-centric design: The system treats of-GPU prefetch overlap, lookahead-driven sparsity prediction, and sparsity-accuracy tradeoff as a joint systems optimization problem.
Conclusion
OasisKV demonstrates that KV-cache sparsity can be turned into throughput gain in production-grade serving systems. By reusing speculative decoding's draft tokens as a lookahead signal, the system achieves accurate prediction of future KV access patterns without additional training or model-specific modifications.
Key takeaways:
- Lookahead prediction maintains accuracy within 0.7 points of full attention under a 2,048-token KV budget
- 1.69× throughput gain over dense vLLM on reasoning workloads with only 0.1 points accuracy loss
- Up to 2.1× on multi-GPU long-context serving
- ~2× dense throughput under PD disaggregation with 6.5–9.7× less KV admission and 2.2–2.6× less host memory
Future directions: Enabling speculative decoding jointly with draft-based prefetching (allowing accepted draft tokens to amortize the draft overhead), extending the prefill node's host DRAM to remote memory servers or SSD-based storage tiers, and exploring new model-system co-design opportunities spanning KV-cache sparsity, long-context capability, memory hardware scaling, and system performance.
Related papers
- SPADE: Self-Play in Adaptive Synthetic Executable Environments
SPADE lets a single LLM both write executable training environments and solve them, achieving +8.1 average improvement over base on eight held-out benchmarks via hint-based regret self-play.
- Phantom Gains: Auditing Self-Improvement Against a Measured Null
Transition-level auditing of LLM self-improvement requires measured nulls for every statistic; without them, a frozen model falsely appears to expand at 0.280.
- HarnessOpt-Bench: Evaluating LLMs at Harness Optimization
HARNESSOPT-BENCH shows optimizer model choice matters 1.8x more than coding harness choice for agent improvement, with broader search driving gains and trace reading providing no benefit.