Architecture
1. Query-Side Adjoint RoPE in \(SO(2)\) (Standard GQA & DeepSeek MLA)
Every chunk is prefilled once at canonical offsets \([4, \dots, L_c + 3]\) (behind a shared 4-token canonical attention sink). When chunk \(c\) is mounted at global offset \(\Delta_b\), its key stays 100% immutable in HBM:
For DeepSeek-V2 / V3 / R1 Multi-Head Latent Attention (MLA), DeepSeekMLADAGKVEngine (auto-selected by AutoDAGKVEngine) absorbs W_UK and W_UV directly into the query/output projections so physical blocks store only compressed latents \(c_{KV}\) (\(d_c = 512\), 1 MQA head) and canonical decoupled RoPE keys \(k_R\) (\(d_r = 64\), 1 MQA head) — delivering 8.89× native KV VRAM compression vs. expanded HF caches on real pretrained DeepSeek-V2-Lite-Chat before any quantization. triton_adjoint_mla_paged_attention counter-rotates only \(q_R\) (152.5× on RTX 2080 Ti; 107.3× on Blackwell sm_120, 8.01 ms @ 64K), paired with Latent-Space Query-Guided MLA Bridge Repair (3/3 EM on permuted 6-doc RAG and 8.48× TTFT speedup at 32K).
2. Exact Layer-1 \(Q_1\) LSE Perturbation & Submodular Bridge Repair
Isolated prefill captures true rotated Layer-1 queries \(Q_1\) via a lightweight forward pre-hook and stores compact local Log-Sum-Exp scalars \(\ell_i^{\text{local}}\). At stitch time, exact RoPE-aligned cross-chunk perturbation weights
rank tokens for 1D NMS submodular or lse_hybrid selection (default 4.0%, optionally pyramid-pruned to 1.5% at mid-depth) and micro-prefill into request-private Copy-on-Write (CoW) shadow blocks.
3. Fused Triton Kernels, CUDA Graphs & Multi-GPU Parallelism
- Decode: GQA-grouped + Split-KV (FlashDecoding) Triton kernels for
FP16,BF16,FP8,INT8,K8V4, andINT4 (K8g/V32g)with 64-bit physical block indexing (>2 GiBpools) and static-shape CUDA Graph replay (enable_cuda_graph_decode(), 2.17× faster B=1 K8V4 decode at63.6 tok/s). - Suffix Prefill: GQA-grouped Split-KV tiled prefill (
triton_gqa_prefill.py,BLOCK_M=64,33.27 ms@64KK8V4 on Blackwellsm_120) with hoisted per-row Ada/Hopper/Blackwell (sm_89+/sm_90/sm_120) Native FP8 E4M3 Tensor Core dispatch (5.15×@36.8Kon H200Qwen2.5-14B,3/3 EM). - Multi-GPU Topologies: Choose between In-Process Megatron Tensor Parallelism (
TensorParallelDAGKVEngine, sharding both weights and KV heads by1/TP) and Pipeline Sharding with Ping-Pong Overlap (ShardedDAGKVEngine). - Cross-Platform Backends: Automatic dispatch to NVIDIA/ROCm Triton, Apple Silicon MLX (
mlx_backend.py) / MPS, and pure PyTorch CPU fallbacks.
4. 4-Tier Cluster KV Fabric & Schema v1
- Tier 1 (GPU HBM): Immutable content-addressed paged KV pools (
BlockManager). - Tier 2 (Host RAM): Page-locked
PinnedCPUPoolwith async DMA staging. - Tier 3 (Local NVMe): Model-namespaced
DiskKVCachewith frozenSCHEMA_VERSION = "1.0", lazy quantized eviction spill, and LRU disk quotas. - Tier 4 (Cluster Fabric & 100GbE RoCE RDMA): Pluggable
RemoteKVStore(SharedHTTPKVStore, zero-copyBinaryStreamKVStore,RedisKVStore,S3KVStore) plusNCCLRDMAKVStore&NIXLRDMAKVStore— live-verified over physical 100GbE RoCE (bnxt_re0) directly between NVIDIA H200 NVL → Blackwell RTX PRO 6000 at10.437 GB/s(83.50 Gbps,107×vs. HTTP,6.25 msfor 64 MB, bit-exact) and traced end-to-end with OpenTelemetry (dag_kv.observability).