# Prefill-Decode Disaggregation

- **Canonical URL:** https://getaimath.com/dictionary/prefill-decode-disaggregation/
- **Topics:** [LLM Inference: Prefill & Decode](https://getaimath.com/dictionary/category/llm-inference-prefill-and-decode/)
- **Last updated:** 2026-11-25

## What is Prefill-Decode Disaggregation?

**In one sentence:** Prefill-decode disaggregation runs the prefill and decode phases on separate machines, each tuned for its job.

Prefill is compute-heavy and decode is memory-heavy, so mixing them on the same GPUs can slow both down. Splitting them lets each group of machines be used efficiently. The KV cache is passed from prefill machines to decode machines.

![How an AI Replies: 1. Read Your Question → 2. Type the Answer — Simple two-step cartoon: Step 1 (Prefill) shows the AI scanning your entire question in one flash (causing the brief pause before it starts talking); Step 2 (Decode) shows it typing out the reply one word at a time.](https://getaimath.com/diagrams/llm-inference-prefill-and-decode.png)
*Napkin Diagram (LLM Inference: Prefill & Decode): Every AI reply has two halves: gulping down your whole prompt at once, then speaking the answer one word at a time.*

## What is an example of Prefill-Decode Disaggregation?

A large AI service might send prompts to "prefill" GPUs and then hand off to "decode" GPUs for writing answers.

## Why does Prefill-Decode Disaggregation matter?

It helps big AI services run faster and cheaper at scale.

## Related Concepts

- [Memory-Bound](https://getaimath.com/dictionary/memory-bound/): A task is memory-bound when its speed is limited by how fast data can be read from memory, not by math speed.
- [Compute-Bound](https://getaimath.com/dictionary/compute-bound/): A task is compute-bound when its speed is limited by how fast the chip can do math.
- [Memory Bandwidth](https://getaimath.com/dictionary/memory-bandwidth/): Memory bandwidth is how fast data can move between a chip's memory and its processors, usually measured in gigabytes per second.
- [Latency](https://getaimath.com/dictionary/latency/): Latency is the delay between asking for something and getting a response.
- [Throughput](https://getaimath.com/dictionary/throughput/): Throughput is the total amount of work a system completes over time, like the number of tokens or requests per second across all users.
- [Sampling](https://getaimath.com/dictionary/sampling/): Sampling is how a model picks the next token from its list of possible options, using their probabilities.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/prefill-decode-disaggregation/)
