Understanding LLM inference: How Prefill and Decode phases impact speed

techNmak · x · 2026-08-12

This post breaks down the underlying mechanics of LLM inference latency by splitting the process into two core phases:

The author notes that beyond input/output lengths, factors like model architecture, memory pressure, hardware bandwidth, and batch size significantly impact inference speed and cost. Thus, when an LLM feels slow, it's crucial to distinguish whether the bottleneck is waiting for the first token (Prefill) or slow subsequent generation (Decode).

Original post →

More from Infra

Infra channel →