First-token latency and streaming
All articles

First-token latency and streaming: the two different problems your users actually notice

Users experience time-to-first-token and the streaming rate as two separate perceptions. They care about both, but in different ways. That difference determines which one you should optimize first for your specific product.

Two distinct user experiences

Time-to-first-token (TTFT) is the interval between a user submitting a request and the first piece of output becoming visible. During this window, the interface is silent. The user is waiting, unsure whether the system is processing or has lost their request.

Streaming rate is the speed at which subsequent output arrives after the first token. A user who has seen the first word or sentence appear is in a different psychological state: something is happening, progress is visible, attention shifts from "is this working" to "what is being said."

Human perception studies on response delays consistently show that the wait before any feedback is more distressing than a slower but visible progress rate. A product that shows a spinner for a long time and then delivers complete output is often perceived as slower than one that starts showing output quickly, even if the total time is identical. This is a well-established UX finding, not a speculation.

What drives TTFT

TTFT is dominated by the prefill phase: processing the input prompt and loading the KV cache. For a model running on dedicated hardware, prefill latency scales with prompt token count and model size. For a shared serving system, TTFT also includes queue time: the request waiting behind other requests that arrived first.

Queue time is often the larger variable in production systems. A model that can complete prefill in a few hundred milliseconds may show TTFT of several seconds at peak concurrency if the queue is long. Reducing TTFT in a shared system requires reducing queue depth, which requires faster prefill, more capacity, or smarter scheduling.

Autoscaling helps with capacity, but autoscaling has its own latency: cold-start time for a new instance means the first wave of demand after a quiet period still experiences elevated TTFT before the new capacity is available. This is why TTFT is often worst during the first minutes of a traffic spike.

What drives streaming rate

Streaming rate is the per-token generation speed during the decode phase. For autoregressive generation, this maps directly to how quickly the model can execute sequential forward passes: tokens per second at your batch size and hardware configuration.

Streaming rate is usually more predictable than TTFT because it is less affected by queueing. Once a request is being decoded, it runs at a relatively stable rate. The perceived streaming rate may vary based on how you batch and dispatch tokens to the client, but the underlying generation speed is fairly consistent within a session.

For typical language model outputs in interactive applications, there is a floor below which streaming rate stops mattering to users: if output is arriving faster than it can be read, additional speed is imperceptible. The bottleneck at that point is human reading speed, not generation speed. Optimizing decode throughput well past that threshold is engineering effort with no user benefit.

The parallel decoding difference

Parallel decoding changes the streaming model in a way that affects which optimization problem matters.

In autoregressive generation, streaming is natural: each token is available as soon as it is generated, so output can be pushed to the client continuously throughout the decode phase. TTFT is still driven by prefill, but the moment prefill completes, output starts flowing.

In parallel decoding, the model refines all positions simultaneously across K steps. This means output is not available token-by-token during refinement; it is available in a chunk after each refinement round completes. The streaming model is coarser: instead of one token at a time, you deliver the output in one or a small number of segments.

For products built around character-by-character streaming display, this is a real UX consideration. For products that show a loading state and deliver a complete response, it is not. This is one of the concrete reasons why choosing between autoregressive and parallel decoding is partly a UX question, not just an infrastructure question.

Optimizing TTFT without hurting streaming rate

These two problems have largely independent solution spaces, which means you can often address them separately.

TTFT optimizations: reduce queue depth (capacity scaling, smarter scheduling), reduce prefill cost (prompt length reduction, speculative prefill, prefix caching for repeated prompts), reduce cold-start time (keep-warm strategies, faster instance launch). None of these meaningfully affects decode throughput.

Streaming rate optimizations: batching strategy, model quantization to reduce memory bandwidth pressure, flash attention to reduce KV cache footprint, more efficient decode kernels. These affect decode phase, not prefill.

The mistake is treating the two problems as a single latency problem and throwing the same solution at both. Reducing prefill compute does not speed up streaming. Increasing decode throughput does not reduce the queue wait before prefill starts. Profile which one is the bottleneck for your users before investing engineering effort.

A concrete scenario

A small applied AI team building an internal writing tool noticed that users were abandoning generation more often than expected. The serving logs showed good decode throughput, with output arriving quickly once it started. The team had optimized streaming rate, but had not paid attention to TTFT.

When they profiled TTFT at peak usage hours, they found it was substantially higher than during off-peak development testing because the serving queue was long during peak usage. Users were waiting several seconds before seeing any output, which looked like the tool was unresponsive, and closing the tab before generation started.

The fix was capacity management and smarter scheduling, not faster decode. The streaming rate optimization had been real but irrelevant to the actual user experience problem.

When TTFT matters more than streaming rate

For interactive assistant products where users are typing a message and waiting for a response, TTFT is the critical metric. The blank-screen wait is the user's primary frustration. Streaming rate matters only once output has started; most users are satisfied as long as it is faster than their reading speed.

For batch generation pipelines where a human is not waiting in real time, TTFT is less important than total throughput. The user is not watching; they want all results done by a deadline. End-to-end latency and throughput at scale are the right metrics.

For long-form drafts where users expect a wait, TTFT can be managed with a progress indicator that reassures the user generation is happening. A loading indicator during a known 3-second TTFT is much less frustrating than a blank input box. The indicator does not change the latency; it changes the perception.

Knowing your users' mental model of the wait is as important as knowing your hardware's latency profile. Both are optimization inputs.