DAG-KV
Position-Decoupled Graph KV Cache with Query-Side Adjoint RoPE, LSE-Bounded Submodular Bridge Repair, and Fused Quantized Triton Kernels.
Standard prefix caching (vLLM Automatic Prefix Caching, SGLang RadixAttention) collapses to a 0% cache hit rate whenever documents, RAG passages, or repository source files are reordered. DAG-KV renders physical Key-Value blocks 100% read-only and globally shareable across arbitrary permutations while cutting decode latency, suffix prefill latency, and KV VRAM footprints dramatically.
Key Capabilities (v0.7.0)
- 100% Order-Invariant KV Reuse & Live 3-Way Engine Head-to-Head: Query-Side Adjoint RoPE applies \(\mathcal{R}(-\Delta_b)\) to queries in SRAM registers without mutating HBM. On NVIDIA H200 NVL (141 GB), DAG-KV beats live vLLM 0.34.0 APC by 4.77× (
9.2K) and 4.00× (18.5K) and beats live SGLang 1.0.0 RadixAttention by 4.29× (9.2K) and 3.42× (18.5K) onQwen2.5-14B(3/3 EM), while matching SGLang within0.47 mson18.5Ksame-order prefix hits (25.04 msvs.24.57 ms). - Standardized LongBench (
N=111) vs. CacheBlend HKVD15%: Across real HotpotQA, 2WikiMultihopQA, MuSiQue, and RepoBench-P onQwen2.5-14B(K8V4), DAG-KV (4% → 1.5%) achieves40.70macro avg — outperforming CacheBlend-15% (40.36) at2.10×lower TTFT (88.3 msvs.185.7 ms; up to3.70×on MuSiQue) and4.65×faster than Dense Oracle (410.3 ms; up to10.06×). - 32B-Class Native FP8, K8V4 & 64K GQA-SplitKV Triton Kernels: Verified across Turing RTX 2080 Ti (
sm_75), Hopper H200 NVL (sm_90), and Blackwell RTX PRO 6000 (sm_120) — scalesQwen2.5-32B-InstructNative FP8 up to33.8Kat 10.03× (8.4K) / 7.00× (33.8K,3/3 EM),Qwen2.5-14Bto36.8Kat 5.15× (71.6×bypass), and Blackwell64KGQA-SplitKV K8V4 prefill in33.27 ms(1.44× faster than FP16). - Real
DeepSeek-V2-Lite-ChatAbsorbed MLA Engine (DeepSeekMLADAGKVEngine): Counter-rotates only the decoupled RoPE slice \(q_R\) while leaving compressed latents \(c_{KV}\) untouched with Latent-Space Query-Guided CoW Bridge Repair —8.89×KV VRAM compression,3/3 (100%)EM on permuted 6-doc RAG (vs1/3isolated),8.48×faster prefill at32.0K, and 107×–152.5× Triton MLA decode speedup. - Prompt-Lookup Speculative Decoding, Batched Ragged Prefill & CUDA Graphs: Zero-VRAM lossless speculative decoding reaches
352.1 tok/s(5.04×, 14B) and242.0 tok/s(6.50×, 32B) on H200; batched ragged prefill (B=8) runs 4.39×–5.66× faster; static CUDA Graph decode runs 1.51×–2.17× faster (0.000000diff). - Live 100GbE RoCE Direct RDMA & Multi-Language AST-Delta Caching: Re-prefills only edited functions/classes (92.7% token reuse), spills lazily to NVMe (
SCHEMA_VERSION=1.0), and transfers KV blocks directly GPU-to-GPU from Hopper H200 → Blackwell RTX PRO 6000 over100GbE RoCE(bnxt_re0) at10.44 GB/s(83.50 Gbps,107×faster than HTTP, bit-exact). - Ecosystem Native (
vLLM v1Verified on Live H200 GPU): Zero-fork vLLM v0 & v1 (KVConnectorBase_V1+v1.attention.backend,0.0roundtrip max diff onvLLM 0.34.0), Hugging Face, LangChain, LlamaIndex, OpenTelemetry, Apple MLX, and MCP (dag-kv mcp).
pip install dag-kv
dag-kv info