Building a Paged KV Cache Manager with Prefix Sharing and Copy-on-Write
Build a from-scratch paged KV cache manager for LLM inference, with block-level prefix sharing and copy-on-write semantics. A real systems project for your CV.
Build a from-scratch paged KV cache manager for LLM inference, with block-level prefix sharing and copy-on-write semantics. A real systems project for your CV.
A working engineer’s guide to the internals of vLLM’s PagedAttention memory allocator, with concrete knobs, profile traces, and production patterns for squeezing more tokens per second out of a single GPU.
Mooncake reframes KV cache as a first-class distributed resource. This post walks through its architecture, the KV store design, and why prefilling and decoding benefit so differently from cache disaggregation.
TL;DR — A paged KV cache with grouped-query attention (GQA) sharing and a prefix-reuse eviction policy is one of the most credible LLM-systems projects you can ship to a CV in a weekend. It mirrors the design choices in vLLM, SGLang, and the RadixAttention paper, demonstrates that you understand memory hierarchies, attention math, and eviction, and produces a runnable artifact you can benchmark on real prompts. Why This Project Stands Out on a CV Hiring managers for inference, ML platform, and applied-LLM roles scan portfolios for evidence that a candidate can translate a paper into a working system. A paged KV cache hits that target harder than almost any other weekend project because the design space is genuinely contested in production: vLLM ships PagedAttention, SGLang ships RadixAttention, TensorRT-LLM ships in-flight batching with custom paged kernels, and HuggingFace TGI ships its own block manager. Building one from scratch proves you have read those systems and understood why they look the way they do. ...
A working engineer’s guide to GPU memory: HBM bandwidth, KV-cache math, fragmentation, and the production patterns that keep large model inference honest.