Why is LLM inference challenging?
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
This post explains why LLM inference is hard from a systems angle, covering the KV cache and its memory fragmentation, paged attention borrowing virtual-memory ideas, batching to escape memory-bound decoding, and FlashAttention's fused, tiled softmax that avoids materializing the N×N score matrix in slow GPU memory.