LLM inference flips between compute-bound and memory-bound within a single request

techNmak · x · 2026-11-07

A detailed thread (with infographic) on LLM serving: prefill is usually compute-limited while low-batch decode is memory-bandwidth-limited. For a 32-layer GQA model with 8 KV heads (BF16), an 8,192-token sequence needs 1 GiB of KV cache — 16 sequences already cost 16 GiB. Covers continuous batching, chunked prefill, PagedAttention, prefix caching, FlashAttention, speculative decoding and prefill/decode pool separation. Key takeaway: measure TTFT, inter-token latency, tail latency, KV utilization and cost under realistic workloads, not just raw tokens/s.

Original post →

More from Infra

Infra channel →