---
title: Prefill, decode, and the latency budget
seo_title: Prefill, decode, and the latency budget — video
description: Prefill processes context in parallel; decode generates tokens sequentially. TTFT, TPOT, and throughput measure different phases of the same service.
keywords: LLM inference, prefill, decode, TTFT, TPOT, ITL, throughput, latency, KV cache, serving
date: '2026-09-12T00:00:00+00:00'
robots: index,follow,max-snippet:-1,max-image-preview:large,max-video-preview:-1
hide:
- toc
- navigation
video_watch_page: true
---


<div class="s5-video-watch" data-s5-video-watch data-video-id="videos-series-llm-inference-engineering-economics-01-prefill-vs-decode-ttft-tpot-throughput-latency-budget-md">
  <header class="s5-video-watch__header">
    <div class="s5-video-watch__crumbs"><a href="https://5sigmas.com/en/videos/">All videos</a><span>Other topics</span><span>0:36</span></div>
    <h1>Prefill, decode, and the latency budget</h1><p>Prefill processes context in parallel; decode generates tokens sequentially. TTFT, TPOT, and throughput measure different phases of the same service.</p>
  </header>
  <div class="s5-video-watch__player">
    <video controls crossorigin="anonymous" preload="metadata" poster="/en/series/llm-inference-engineering-economics/01-prefill-vs-decode-ttft-tpot-throughput-latency-budget.jpg" playsinline data-s5-watch-player><source src="/en/series/llm-inference-engineering-economics/01-prefill-vs-decode-ttft-tpot-throughput-latency-budget.mp4" type="video/mp4">Your browser does not support the video element.</video>
    <p>Links containing <code>?t=</code> open the video at a specific second.</p>
  </div>
  <section class="s5-video-watch__summary" aria-labelledby="video-summary-title">
    <div class="s5-video-watch__section-head"><span class="s5-eyebrow">Video summary</span><h2 id="video-summary-title">The ideas to retain</h2></div>
    <div class="s5-video-watch__snippet-grid"><article><span>01</span><h2>The request changes shape after prefill</h2><p>Consider a request with Lin input tokens and Lout generated tokens.</p></article>
<article><span>02</span><h2>TTFT is a client-visible boundary, not one operation</h2><p>A production path to first output can be decomposed as:</p></article>
<article><span>03</span><h2>For reasoning models, distinguish TTFT from TTFO</h2><p>The meaning of “first token” can itself change with model behavior. In current AIPerf, TTFT ends at the first token of any type, including a reasoning token, while TTFO, time to first…</p></article></div>
  </section>
  <section class="s5-video-watch__chapters" aria-labelledby="video-chapters-title"><div><span class="s5-eyebrow">Key moments</span><h2 id="video-chapters-title">Jump directly to a section</h2></div><ol><li><a href="?t=0" data-s5-video-seek="0"><time>0:00</time><span>Prefill builds the state required for decoding</span></a></li>
<li><a href="?t=12" data-s5-video-seek="12"><time>0:12</time><span>Decode advances one token at a time</span></a></li>
<li><a href="?t=24" data-s5-video-seek="24"><time>0:24</time><span>TTFT, TPOT, and throughput form the budget</span></a></li></ol></section>
  
  <aside class="s5-video-watch__source"><div><span class="s5-eyebrow">Context and evidence</span><h2>Continue with the full article</h2><p>The chapter develops the mechanism, primary sources, limitations and connections to the rest of the series.</p></div><a class="s5-video-watch__source-link" href="https://5sigmas.com/en/series/llm-inference-engineering-economics/01-prefill-vs-decode-ttft-tpot-throughput-latency-budget/">Read the article →</a></aside>
  <section class="s5-video-watch__related" aria-labelledby="related-videos-title"><div class="s5-video-watch__section-head"><span class="s5-eyebrow">Next step</span><h2 id="related-videos-title">Related videos</h2></div><div class="s5-video-watch__related-grid"><article><a href="https://5sigmas.com/en/videos/series/evaluating-ai-systems-production/06-observability-failure-taxonomies-production-eval-repair-feedback-loops/"><img src="https://5sigmas.com/en/series/evaluating-ai-systems-production/06-observability-failure-taxonomies-production-eval-repair-feedback-loops.jpg" alt="" loading="lazy" width="1280" height="720"><span>Other topics · 0:36</span><strong>Observability, failure taxonomies, and feedback loops</strong></a></article>
<article><a href="https://5sigmas.com/en/videos/series/evaluating-ai-systems-production/05-online-evaluation-shadow-canary-ab-guardrails-regression-gates/"><img src="https://5sigmas.com/en/series/evaluating-ai-systems-production/05-online-evaluation-shadow-canary-ab-guardrails-regression-gates.jpg" alt="" loading="lazy" width="1280" height="720"><span>Other topics · 0:36</span><strong>Online evaluation: shadow, canary, A/B, and regression gates</strong></a></article>
<article><a href="https://5sigmas.com/en/videos/series/evaluating-ai-systems-production/04-evaluacion-trayectorias-agentes-tools-exito-eficiencia-recuperacion-policy/"><img src="https://5sigmas.com/en/series/evaluating-ai-systems-production/04-evaluacion-trayectorias-agentes-tools-exito-eficiencia-recuperacion-policy.jpg" alt="" loading="lazy" width="1280" height="720"><span>Other topics · 0:36</span><strong>Agent trajectories: success, efficiency, recovery, and policy</strong></a></article></div></section>
</div>
