← All questions
Inference & ServingMedium· Memory Bandwidth· Arithmetic Intensity· Performance

Why is LLM generation slow? What’s the bottleneck?

LLM generation is limited by memory bandwidth because each step involves matrix-vector multiplications and KV cache reads that have an arithmetic intensity near O(1). This is far below the roofline performance of modern GPUs like the H100.

Because the GPU must load the entire model weight matrix and the KV cache from HBM for every single token generated, the performance is constrained by how fast the hardware can move data. The tensor cores are often underutilized because they finish the math faster than the memory system can provide the necessary data.

Code playground (Python)