LLM Inference After Training: a walkthrough of prefill, decode and KV cache

kmeanskaran · x · 2026-09-17

A walkthrough article for readers who already know attention and transformers, aiming to make them able to trace one request through a GPU, understand the memory terms that matter, and treat FlashAttention, PagedAttention, continuous batching, and RadixAttention as named optimizations rather than buzzwords.

The author highlights a common misconception: people fluent in training narratives assume inference is just the same network minus the backward pass, which leads them to reach for optimizations before identifying which phase is slow. No CUDA needed — just Q, K, V and a trained model, starting from GPU memory terminology, with no kernel writing.

Original post →

More from Infra

Infra channel →