LLM Latency Explained: Time to First Token, Throughput, and What Users Actually Feel

Ask two people how fast an LLM is and you will get two different answers. One points at the total time a reply took. The other points at how quickly the first words appeared. Both are talking about latency, but they measure different things. Time to first token is the delay between sending a request and seeing the first piece of the answer. If that delay is short, the app feels responsive even when the full reply takes a while. If it is long, users stare at a spinner and wonder whether anything is happening.

Time to First Token: The First Number That Matters

Time to first token, usually shortened to TTFT, measures the wait before the model produces its first token. A token is a small chunk of text, roughly a word or part of a word, so the first token is the first visible fragment of the answer. TTFT covers everything before generation starts: your request travels to the server, the provider queues it, the model reads your whole prompt, and then it produces that first chunk.

That reading step is why long prompts usually mean slower time to first token. The model has to read the entire input before it can start answering, so a prompt with a long document attached takes longer to get going than a short question. Long conversation histories have the same effect: each new message carries the earlier turns with it, so the model re-reads more text before it responds. If a chatbot seems to get slower as a conversation grows, this is one reason why.

TTFT also explains why streaming changes how an app feels. When an API streams its response, the user sees words appear as they are generated instead of waiting for the complete answer. A reply that takes ten seconds in total can still feel quick if the first words arrive almost immediately. The same reply delivered all at once, after ten seconds of silence, feels slow. The total work is identical. The experience is not.

LLM Throughput: How Fast Tokens Arrive After That

Once the first token appears, throughput takes over. LLM throughput is the rate at which new tokens are generated, often described as tokens per second. It decides how quickly a long answer finishes once it has started. High throughput means a long summary scrolls onto the screen in a steady flow. Low throughput means words trickle out one at a time, and the user waits even though the app clearly started working.

Throughput and time to first token can move in opposite directions. A setup can start fast and then crawl, or start slowly and then pour out text quickly. You need both: how long before the first word, and how fast the rest follows.

Larger models generally generate tokens more slowly than smaller ones, because each token needs more computation. Long outputs expose throughput more clearly than short ones: a two-sentence answer finishes quickly at almost any speed, while a long draft makes a slow generation rate obvious. Server load matters too. When many requests share the same hardware, each one gets a smaller share of computing power, and generation slows for everyone. This is also where the KV cache comes in: the model stores intermediate results so it does not recompute the whole prompt for every new token, and when memory runs short, throughput drops.

LLM Response Time Is Not One Number

People often quote a single figure for LLM response time, but that figure hides three separate stages. The first is time to first token. The second is the generation phase, governed by throughput. The third is everything around the model: network travel, request queues, retries, and any tools or database lookups your app runs before or after the model call.

That third stage catches many teams by surprise. An app can call a fast model and still feel slow because it runs a search step first, waits for a tool result, or sends the request through several layers of its own backend. The model itself may have finished quickly, but the user only sees the total. When you measure latency, measure it at the point the user experiences it, not only at the model API, and compare the two: the gap tells you whether the problem sits in your app or in the provider.

What Slows an LLM Down in Practice

Prompt length is the most common drag on TTFT. Long system prompts, pasted documents, and full conversation histories all add reading time before the first token. Trimming what the model does not need is often the cheapest speed win available: send only the history that matters for the current question, and summarise older turns instead of carrying them verbatim. If the same long instructions go out with every request, prompt caching can help, because the provider reuses the processed version of the repeated part instead of reading it from scratch each time.

Model choice trades speed against capability. A smaller model usually starts and generates faster, but it may need clearer instructions to give a good answer. A larger model handles harder reasoning and longer context, but each token costs more time. The right choice depends on the job: a classification task rarely needs the largest model, while a multi-step reasoning task might. Test with your real prompts rather than assuming the biggest model is always worth the wait.

Output length matters too: models generate one token at a time, so ask for the length you actually need and let the user request more detail when they want it. Shorter answers also cost less, since most providers charge per token; see our guide on how to track AI API costs before the bill surprises you.

What Users Actually Feel

Users do not experience tokens per second. They experience waiting, reading, and deciding whether to keep going. A user asking a quick factual question expects a quick answer. A user who asked for a detailed plan will wait longer, as long as they can see progress. Set your target from what your users are doing, not from someone else’s numbers.

Token streaming is the strongest tool for managing that feeling, because it turns waiting into reading. Once words start appearing, the user has something to do: they read the first lines while the rest generates. This works best when the first lines are useful on their own, not filler. A reply that opens with a direct answer and then adds detail feels fast. A reply that opens with a long preamble and only reaches the point near the end feels slow, even at the same speed.

Streaming also has a limit: if tokens arrive so slowly that reading feels like watching each word appear one by one, the problem is throughput, not TTFT, and the fix is a faster generation setup or a shorter answer, not a better loading animation.

How to Measure and Improve Latency

Log three timestamps for every LLM call: when the request leaves your app, when the first token arrives, and when the final token arrives. From those three points you can calculate TTFT, total generation time, and throughput. Log them with the model name, the prompt length, and the output length, so you can compare like with like. Look at the spread, not just the average: occasional very slow calls still frustrate users.

Test with realistic prompts, not toy examples: use a sample of actual production prompts, with personal data removed, and run them at different times of day. When you compare providers or models, keep the prompt and output length fixed and run the same test several times. If you route requests through an LLM router, measure before and after the router as well, so you can see whether it is helping or adding delay of its own.

To make an LLM feel faster, shorten the prompt first. Cut system instructions that repeat what the model already does well, drop irrelevant history, and move long reference material into retrieval instead of pasting it every time. A related idea is semantic caching: when users ask the same or very similar questions, a cached answer can skip the model call entirely, which is faster than any model. Stream every response the user watches, show a clear indicator while waiting for the first token, and put the direct answer first so the user gets value from the earliest tokens.

Match the model to the task, and set a timeout with a fallback: if a request takes far longer than usual, retrying it or falling back to a faster model beats letting the user wait indefinitely.

LLM latency is not a single speed score. It is time to first token, throughput, and everything around the model call, and each one shapes what users feel in a different way. Measure all three in your own app, with your own prompts, and fix the stage that is slow.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.