Skip to main content
AI / MLLLM FundamentalsDiagramIntermediate

TTFT (Time to First Token)

KO: TTFT (첫 토큰 응답 시간)·EN: TTFT (Time to First Token)·JA: TTFT(初回トークン到達時間)·Time to First Token

The latency measured from sending an LLM request until the very first generated output token arrives—the primary driver of perceived responsiveness

Table of Contents

Structure Diagram

LLM Latency Breakdown: TTFT vs TPOT
Streaming Request Lifecycle3 steps
STEP 1Net + Queue(12ms)
Quick Answer

What is TTFT (Time to First Token)?

The latency measured from sending an LLM request until the very first generated output token arrives—the primary driver of perceived responsiveness. It is a core concept in LLM Fundamentals within AI / ML.

Core Principles

TTFT (Time to First Token) measures the elapsed time from submitting a prompt until the first generated token reaches the client. It combines network overhead, serving queue wait, and prompt prefill compute.

In interactive streaming apps, TTFT shapes perceived speed far more than total completion time. Engineers pair TTFT with TPOT (Time Per Output Token) or Tokens Per Second (TPS) to diagnose prefill versus decode bottlenecks separately.

Practical Takeaways

  • Shrink prefill work first: Because TTFT scales with input length, trimming noisy RAG chunks and enabling Prompt Caching delivers the fastest wins.
  • Measure end-to-end user TTFT: Include embedding, retrieval, and reranking latency in your P95 telemetry so hidden upstream delays do not surprise users.
  • Set strict SLOs by modality: Aim for <1s TTFT in text chat and <300–500ms in voice or IDE autocomplete workflows, using smaller fast models where needed.

Notable Examples

  • Real-Time Voice Agents: Keeping LLM TTFT under 400ms prevents awkward pauses in conversational turn-taking.
  • IDE Inline Autocomplete: Uses compact models and aggressive prefix caching to render ghost text within ~200ms.
  • Multi-Provider LLM Gateways: Monitor live P95 TTFT across model endpoints to route traffic away from congested regions.