---
title: "Prefill vs decode in LLM inference"
description: "A practical guide to prefill, decode, TTFT, inter-token latency, chunked prefill, and why one LLM request creates two serving workloads."
canonical_url: "https://fanout.sh/blog/prefill-vs-decode-llm-inference"
md_url: "https://fanout.sh/blog/prefill-vs-decode-llm-inference.md"
last_updated: "2026-11-11"
access: "pro-preview"
---

# Prefill vs decode in LLM inference

A practical guide to prefill, decode, TTFT, inter-token latency, chunked prefill, and why one LLM request creates two serving workloads.

- Author: Suraj Gaud

- Published: 2026-08-03

- Updated: 2026-11-11

- Track: Inference engineering

- Access: Fanout Pro (public preview)

- Tags: LLM inference, prefill, decode, latency, vLLM

One LLM request creates two different workloads on the same model.

First, the engine processes the prompt and builds its KV cache. Then it generates output one token at a time while reading that cache.

Calling both phases “inference” is correct but operationally incomplete. They stress the hardware differently, expose different latency metrics, and compete when a scheduler mixes them carelessly.

This guide uses the [DistServe paper](https://arxiv.org/abs/2401.09670) and current [vLLM scheduling guidance](https://docs.vllm.ai/en/latest/configuration/optimization/) as primary references.

## In this article

- Prefill turns the prompt into model state
- Decode advances one dependent step at a time
- The two phases have different arithmetic shapes
- TTFT and inter-token latency can move in opposite directions
- A long prefill can stall many decodes
- Chunked prefill creates scheduling boundaries
- Chunking is not the same as continuous batching
- Disaggregation gives each phase its own resources
- Prefix caching mainly reduces repeated prefill work
- Capacity planning must count both token streams
- A practical diagnosis order
- The useful mental model

## Continue reading

This field note is part of Fanout Pro, with the complete archive, courses, labs, and every Daily paper guide.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
