Decode
Also called: Decode Phase
What is Decode?
In one sentence: Decode is the second step of answering, where the model writes its reply one token at a time.
What does Decode look like?
The steady stream of words you see after a chatbot starts typing is the decode phase.
Why does Decode matter?
Decode speed sets how fast answers appear once they start.
Decode vs. Prefill
Prefill digests your entire input prompt in parallel (compute-bound) to produce the first token; decode generates the reply one token at a time (memory-bandwidth-bound).
| Dimension | Decode | Prefill |
|---|---|---|
| Processing style | Sequential—1 output token per step | All prompt tokens processed in parallel |
| Hardware bottleneck | VRAM memory bandwidth (GB/s) | GPU compute (TFLOPS) |
| User metric | Time Per Output Token (TPOT) / TPS | Time to First Token (TTFT) |
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/decode/">Decode, explained simply</a> (The AI Math Dictionary)