ttft
Inference interview questions tagged ttft, across every topic.
17 questions · 5 unlocked for you
Concepts behind "ttft"
Concept pages for the mechanisms these questions lean on.
Foundational
Latency Decomposition: Queue, Prefill, DecodeHow to break LLM request latency into its parts: TTFT is network plus queue plus prefill, end-to-end adds output length times inter-token latency. Which vLLM metrics measure each part, why percentiles do not add, and how Little's law cross-checks a dashboard.🩺 Performance Debugging
Advanced
Prefill Versus Decode: Two Workloads on One GPUEvery LLM request runs two different workloads: prefill processes the whole prompt in one compute-bound pass, then decode generates one token per step and is bound by weight and KV reads. Which one dominates a request decides the metric you tune, the batching policy and whether the two phases belong on the same GPU.⚛️ Inference Physics🔒 Premium
Advanced
Prefix Caching and Chained Block HashesAutomatic prefix caching keeps the KV blocks of finished requests and reuses them when a new prompt starts with the same tokens. Each full block is keyed by a hash chained from its parent block, which makes a hit mean the whole prefix matched; that decides TTFT for shared system prompts and how much cache multi-turn traffic needs.🧮 KV Cache & Memory🔒 Premium
Advanced
Chunked Prefill and the Token BudgetChunked prefill splits a long prompt into pieces that ride along with decode tokens, under a per-step token budget such as vLLM's max_num_batched_tokens. The budget controls how much prompt work shares a step with decode, trading prompt progress against token gaps without guaranteeing a fixed latency.⏱️ Batching & Scheduling🔒 Premium
Advanced
Prefill and Decode DisaggregationDisaggregated serving runs prefill and decode on separate GPU pools and ships each request's KV cache between them. This page prices the interference it removes, the transfer it adds (2.5 GiB for an 8K-token Llama 3.3 70B prompt), how to size the prefill-to-decode ratio, and when the extra hop is not worth it.🕸️ Distributed Inference🔒 Premium