ARCHOS 525 BLUEPRINT · /d/dgm_continuous-batching-kv-cache
vLLM Continuous Batching & PagedAttention KV-Cache Internals
8 COMPONENTS · 7 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_continuous-batching-kv-cache) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_continuous-batching-kv-cache)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_continuous-batching-kv-cache" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="vLLM Continuous Batching & PagedAttention KV-Cache Internals — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["LLM Gateway"]
sched_1["Iteration Scheduler"]
pfix_2[("Radix Prefix Cache")]
btab_3[("PagedAttention Table")]
hbm_4[("GPU HBM KV Blocks")]
kern_5["Attention & FFN Kernel"]
swap_6[("CPU Swap / Preempt")]
downstream_7["Downstream & OTel"]
client_0 -->|"1. Enqueue · gRPC/SSE"| sched_1
sched_1 -->|"2a. Hash · RAM"| pfix_2
sched_1 -->|"2b. Allocate · CUDA"| btab_3
btab_3 -->|"3a. Gather · HBM3"| hbm_4
kern_5 -->|"Decode · TensorCo"| hbm_4
btab_3 -->|"3b. Preempt if · PCIe"| swap_6
swap_6 -.->|"4. Emit / · OTLP/API"| downstream_7COMPONENT STACK (8)
- LLM GatewaySTATELESSStreaming SSE Prompts
- Iteration SchedulerSTATELESSContinuous batch + chunked prefill
- Radix Prefix CacheSTATEFULShares static system-prompt KV
- PagedAttention TableSTATEFULMaps logical -> physical 16-tok
- GPU HBM KV BlocksSTATEFULNon-contiguous VRAM
- Attention & FFN KernelSTATELESSPrefill / Decode
- CPU Swap / PreemptSTATEFULEvicts low-prio seq on HBM pressure
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (7)
- LLM Gateway → Iteration Scheduler (Enqueue)[gRPC/SSE]
- Iteration Scheduler → Radix Prefix Cache (Hash)[RAM]
- Iteration Scheduler → PagedAttention Table (Allocate)[CUDA]
- PagedAttention Table → GPU HBM KV Blocks (Gather)[HBM3]
- Attention & FFN Kernel → GPU HBM KV Blocks (Decode)[TensorCo]
- PagedAttention Table → CPU Swap / Preempt (Preempt if)[PCIe]
- CPU Swap / Preempt → Downstream & OTel (Emit /)[OTLP/API]