# What Is Prefill?

> Prefill is the first phase of inference: the model processes all input tokens at once and builds their KV cache. The longer the input, the longer prefill takes, which is the direct reason long-context requests have a high time to first token. The following phase, which generates output tokens one at a time, is called decode.

URL: https://vuke.top/en/glossary/prefill · Updated November 12, 2026

Prefill is the first phase of inference: the model processes all input tokens at once and builds their KV cache. The longer the input, the longer prefill takes, which is the direct reason long-context requests have a high time to first token. The following phase, which generates output tokens one at a time, is called decode.

## In the measurements

Every hit on an external KV cache saves one full prefill. That is the fundamental reason KV cache tiering lowers TTFT.
