L3S1 · ROI & FeasibilityS3 · Model & AgentS5 · Eval & LLMOpsS6 · Security & FinOpsVerified: 2026-11-30
vLLM Speculative Decoding & Radix Prefix Cache Serving Benchmark (Project)
AI Infrastructure reference project benchmarking vLLM PagedAttention, automatic prefix/radix KV caching, speculative decoding, and Prefill-Decode disaggregation under multi-turn agentic workloads for TTFT, TPOT, and Goodput SLA optimization.
Best For
AI Infra, ML Systems, and Software Engineers demonstrating GPU bottleneck profiling, KV-cache reuse, and SLA-constrained goodput engineering.
Human-AI Boundary
Gateway enforces per-tenant TPM/concurrency circuit breakers and tier fallback routing while exposing KV-cache pressure and goodput alerts to SRE dashboards.
Anti-Patterns to Avoid
- Reporting raw offline aggregate tok/s throughput while ignoring P99 TTFT and inter-token latency (TPOT) collapse under mixed long-prefill workloads
- Enabling speculative decoding indiscriminately at high batch sizes where verification compute overhead worsens tail TPOT
Latency/Cost Profile & Eval Metrics
Multi-turn cached TTFT <= 180ms P95; Decode TPOT <= 28ms/token under strict Goodput SLO · GPU HBM KV-cache occupancy + prefill FLOPs vs $/1M generated tokens at target Goodput
- SLO-Compliant Goodput & KV Prefix Cache Hit Rate: >= 80% prefix KV reuse on multi-turn agent traces; +2.1x Goodput under TTFT<300ms / TPOT<35ms SLO (Measured across OpenAI-compatible load generator replaying 8K-32K multi-turn tool-use traces)
- Speculative Decoding Acceptance & Effective Speedup: Mean acceptance length >= 2.8 tokens at low-to-medium concurrency with <= 0% output distribution drift (Sweeps concurrency 1..64 to identify exact batch crossover point where draft verification saturates FLOPs)
📦 Project Deliverables & Portfolio Artifacts
- Reproducible Docker/Compose serving harness comparing Vanilla Continuous Batching vs APC/RadixAttention vs Speculative Decoding vs PD-Disaggregation
- Async SSE load-testing suite simulating realistic multi-turn prefix-shared agentic traffic with P50/P95/P99 TTFT, TPOT, and Goodput plots
- FastAPI SSE gateway with per-tenant Redis TPM rate limiter, backpressure handling, and small-to-large cascading model router
- Roofline & $/1M-token FinOps trade-off report identifying exact concurrency crossover thresholds
🎤 Interview Defense & System Design Deep-Dive Q&A
- Why is LLM Prefill compute-bound while Decode is memory-bandwidth-bound, and how does mixing them in the same batch cause TPOT jitter?
- At what batch concurrency does speculative decoding stop accelerating throughput and actually hurt latency?
- How do you structure multi-turn agent prompts and KV-cache routing (sticky session hashing) to maximize Radix/Prefix cache hits?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
Bidirectional Taxonomy Links
[HubB] Role Lens · AI Infrastructure & LLM Inference Systems Engineer[HubB] Role Lens · Machine Learning & Inference Systems Engineer[HubB] Role Lens · Backend / Full-Stack SWE Pivoting into AI Systems[HubB] Role Lens · AI Inference & Kernel Optimization Engineer[HubB] Role Lens · AI Research Scientist (Post-Training & Eval)[L0 Card] vLLM PagedAttention & Continuous Batching[L0 Card] Prompt Caching & RadixAttention[L0 Card] SSE Streaming & Backpressure Control[L0] vLLM PagedAttention & Continuous Batching Serving Engine[L0] SGLang RadixAttention Automatic Prefix Caching & Constrained Serving[L0] LLM Token FinOps, Prefix Caching & Tenant-Isolated Semantic Cache Gateway[L0] Confidence-Based Cascading Model Router & Pareto FinOps Primitive[L1] Stage 1 · Build vs Buy: Frontier API vs Self-Hosted Open-Weights TCO Break-Even Pattern[L1] Stage 6 · Per-Tenant Token Quota Rate-Limiter & Graceful Circuit-Breaker Pattern[L1] Stage 4 · Inline Grounded Citation Streaming & HITL Escalation UX Pattern[L2] L2 System Design · Distributed Prefill-Decode Disaggregated LLM Serving Blueprint
Internal Tools & Primary Sources
- vLLM Documentation — Automatic Prefix Caching, Speculative Decoding & Disaggregated Prefill (official_docs, 2026-11-30)
- SGLang — Efficient Execution of Structured Language Model Programs (RadixAttention) (github, 2026-11-30)