Raphael Friedmann
← Understanding AI

Why an AI answer takes the time it takes

An answer has two phases: the model reads your prompt, then writes the reply one token at a time. What decides the wait for the first word, what decides the speed after it, and what an IT team can change.

You send a question, nothing happens for a moment, then the answer appears word by word at a steady pace. Some tools start faster, some write faster, and the same tool feels slower on a Monday morning. These are separate effects with separate causes, and once you can tell them apart, most complaints about “the AI is slow” turn into a specific problem with a specific fix.

Two phases: reading, then writing#

A language model handles every request in two steps.

Reading the prompt (prefill). The model takes in everything you sent: the system prompt, the conversation so far, attached documents, your question. It processes all of those tokens together, in parallel, which is exactly the kind of work a GPU is built for.

Writing the answer (decode). The model produces the reply one token at a time. Each new token needs a full pass through the model, and the next token can’t start until the previous one is done, because it depends on it.

The two phases run at very different speeds. On my RTX 5090, imp’s performance gate for Qwen3-8B (an 8-billion-parameter model) measures 12,108 tokens per second for reading a 512-token prompt and 286 tokens per second for writing a 128-token answer. The arithmetic: reading the whole prompt takes about 0.04 seconds, writing 128 tokens about 0.45 seconds. Same model, same card, and a token is read about 42 times faster than it is written. Prefill and decode obey opposite limits: reading is limited by how fast the chip can calculate, writing by how fast it can fetch the model from memory.

That gives you two numbers to watch instead of one.

One request, from sending to the last word
time to first tokentokens per secondqueueread promptthinkingbusy hoursprompt lengthreasoning onlyone token per passfirst visible word
Lengths are illustrative. The first three steps are invisible to the user and add up to the time to first token. Each bar on the right is one token, written after the one before it.

Why a long prompt delays the first word#

Reading is fast per token, but the prompt is often much longer than you think. Every turn, the whole conversation goes back in, together with the system prompt, tool definitions and any retrieved documents. A chat that has run for an hour, or a question with a 40-page PDF attached, can be tens of thousands of tokens.

For a larger model on the same card, Qwen3.8-27B, imp reads 11,730 tokens per second (measured on a 4,096-token prompt). At that rate a 50,000-token prompt takes about four seconds before the first word can appear, and in practice longer, because the attention part of the work grows faster than the prompt: every token looks back at every token before it.

Two things shorten this. A shorter prompt, obviously. And prompt caching: if a request starts with exactly the same text as a recent one, the server reuses the work it already did on that beginning and reads only the new part.

Why a bigger model writes slower#

To write one token, the chip has to fetch the whole model from its memory. The calculation itself is quick; the fetching is not.

An RTX 5090 moves about 1.79 terabytes per second. An 8-billion-parameter model stored at 16 bits is about 16 GB, so the card can fetch it at most around 110 times a second: a ceiling near 110 tokens per second, no matter how fast the chip calculates. That gives two levers. Fewer bytes per weight, which is what quantisation does, and fewer weights per token. A bigger model means more bytes per token, so it writes slower.

Writing speed by model size, one RTX 5090
Qwen3-8B273.9Qwen3-14B169.2Qwen3.8-27B96.4Qwen3-Coder-30B-A3B (MoE)357.6
Tokens per second, one user, imp with 4-bit (NVFP4) weights, 2026-10-30, from the benchmark table on the home page. The three dense models slow down as they grow. The mixture-of-experts model has 30 billion parameters but uses about 3 billion per token, so it writes fastest.

The last row looks like an exception but follows the same rule. A mixture-of-experts model has many parameters but only uses a small part of them for each token, so it fetches fewer bytes per token than a dense 8B model and writes faster, while needing the memory of a 30B one. “Bigger is slower” is really “more bytes fetched per token is slower”.

Why thinking models take longer#

A reasoning model writes out its working before the answer. Those thinking tokens are ordinary decode tokens, produced at the same speed as the answer, usually hidden or shown collapsed. At around 300 tokens per second, 2,000 tokens of thinking are about seven seconds of silence before the first visible word, and on a hosted service you also pay for them as output.

That is why the effort setting or thinking switch matters for speed, not only for cost. A question that needs no deliberation (reformat this, translate that, extract these fields) gets the same answer faster with thinking off or set low.

What the cloud adds: the queue and the neighbours#

Everything so far assumes the card works only for you. A hosted service doesn’t. It serves many users at once on the same GPUs, and two things follow.

Your writing speed is shared. Servers combine many users’ requests into one pass over the model (continuous batching), because the expensive fetch from memory then serves all of them. Total output rises sharply, while each user’s share drops. Measured on my card with a 40-billion-parameter MoE model: 355 to 386 tokens per second for one user, 1,955 to 1,967 in total for 32 users, so about 61 each if split evenly. Each of the 32 gets a slower stream, and the card does about five times as much work.

Your request can wait in line. When every slot is busy, a new request waits before its prompt is even read. That wait lands entirely in the time to first token, and it grows at the hours when everyone uses the service. Rate limits add to it: a request over your account’s limit is rejected or delayed, and new accounts start on low limits.

Agents multiply all of this. Every tool call is a full round trip: the agent loop sends the growing transcript back in, waits for a first token, writes a short tool request, runs the tool, and starts again. Ten tool calls mean ten waits in the queue and ten prompt reads.

What an IT team can change#

Most of the levers are in your hands, not the provider’s.

Lever What it shortens How
Shorter prompts Time to first token Trim old conversation, retrieve fewer and smaller chunks, send only the tools the task needs
Stable beginning of the prompt Time to first token Fixed instructions and documents first, so prompt caching can reuse them
Smaller or routed model Both Send simple requests to a small model, hard ones to a big one
Thinking off or low effort Time to first token For reformatting, extraction and translation
Shorter answers Total time Ask for the length you need and set a maximum output length
Streaming in the UI Perceived wait Show tokens as they arrive instead of the finished answer
Reserved capacity or own hardware Queue Provisioned throughput, a higher tier, or a local model

Streaming deserves a closer look: it changes none of the numbers and still matters most to users. Without it, the user waits for the whole answer: time to first token plus every token. With it, reading starts after the time to first token, and the model usually writes faster than people read.

On your own server there is one more lever: speculative decoding, where a small draft model guesses several tokens and the big model checks them in one pass. On Qwen3.8-27B in imp it took one stream from 96.87 to 131.28 tokens per second.

What to measure before you change anything#

  • Log time to first token and tokens per second separately. One “response time” hides which phase is slow.
  • Record the prompt length with each request. If the first token gets slower over a conversation, the growing history is the cause.
  • Look at the slow requests, not only the average: the 95th percentile shows the queue.
  • Compare busy hours with quiet ones. If only busy hours are slow, the provider’s capacity or your rate limit is the issue, not your prompts.
  • Check whether prompt caching hits. A cache counter that stays at zero means something at the start of the prompt changes on every call.
  • Turn streaming on before anything else. It is the cheapest change with the biggest effect on how fast the tool feels.

Bottom line#

An answer takes as long as its two phases plus the waiting. The first word waits for the queue, the prompt to be read and any thinking; long prompts and reasoning models push it back. After that, writing speed is set by how many bytes the model fetches per token, so bigger dense models write slower and a busy server splits its speed across users. Shorter prompts, caching, the smallest model that does the job, thinking only where it helps, and a streaming UI cover most of what an IT team can fix.