AI inference glossary
Serving

Prefill

Also known as prompt processing, context encoding

In plain English

Prefill is the model reading and understanding your prompt before it begins writing the answer.

Technical definition

Prefill is the first inference phase, in which the model processes the input prompt and populates the KV cache before generation begins.

Engineering details

Prompt tokens can be processed in parallel, producing large matrix operations that are usually compute intensive. Prefill cost grows with input length and contributes heavily to time to first token.

Why it matters

Prefill has a different resource profile from decode. When both share the same workers, large prompt jobs can interrupt decode batches and make streaming latency less predictable.

How to read it in InferenceX

Disaggregated recipes place prefill on a separately sized GPU pool. When reading a result, check the prefill tensor parallelism, GPU count, input length, and whether KV state must cross a network before decode.