How LLM Inference Works: KV Cache, Batching & Speculative Decoding

youtube.com7 min read

This Stanford lecture explores the mechanics of LLM inference, explaining why generating text is heavily memory-bound compared to model training. The lecture breaks down key performance metrics, arithmetic intensity, the function of the KV cache during decoding, and optimization techniques such as speculative decoding and continuous batching. Open article →

More on this topic