What Happens in 1 LLM API Call? Measured on GPU With Qwen3–8B A benchmark by Arun Prabhakaran of LatentAILabs measured a 10-turn DevOps chat on Qwen/Qwen3-8B in bfloat16 on an NVIDIA A100-SXM4-40GB and found that re-prefilling the full transcript processes 5,549 tokens to read a 963-token conversation, 5.55x the 999 tokens a prefix-cached mode computes, with summed prefill time of 868 ms versus 642 ms (1.35x) across the 10 turns. The time saving only appears once the prompt passes roughly 500 tokens, because below that every forward pass costs about 65 ms regardless of length. The author also reported that Qwen3's chat template drops the empty reasoning block when a turn becomes history, breaking the shared prefix 4 tokens before the reply and defeating prefix caching until the benchmark was re-run with a token-by-token prefix check. By Arun Prabhakaran · @LatentAILabs https://www.youtube.com/@LatentAILabs · Interactive Hub https://latentailabs.github.io/ · Medium https://medium.com/@arunp0 · Hugging Face https://huggingface.co/arunp0 · GitHub https://github.com/latentailabs/episodes/tree/main/ep11-llm-api-call · LinkedIn https://www.linkedin.com/in/arunp0/ Every AI agent framework, whether it is LangGraph, the OpenAI Agents SDK, Claude Code or a custom MCP host, is a loop around one stateless request to an LLM. Before building the loop, it pays to know what happens inside that one request on the GPU. Many agent failures trace back to four facts about that single call: This is Episode 1 of How AI Agents Actually Work . Every number below comes from one setup: Qwen/Qwen3–8B in bfloat16 on an NVIDIA A100-SXM4–40GB PyTorch 2.11.0+cu130 , Hugging Face transformers with eager attention, batch size 1, no CUDA graphs or torch.compile. This is a simple research setup, not a tuned inference server, so absolute latencies would be lower on vLLM or SGLang. The code and raw results are on GitHub https://github.com/latentailabs/episodes/tree/main/ep11-llm-api-call . A chat UI feels like a session that remembers you. The model itself does not. The 15.3 GiB of weights in Qwen/Qwen3-8B are read-only during inference, and nothing about your request is written back into them. Anything that looks like memory is either text your application re-sends or a server-side cache of that text. Here is the demonstration on our GPU : Your application, not the model, keeps the conversation and re-sends the whole transcript on every turn. I timed a 10-turn DevOps conversation in which each turn adds a server log and asks for a one-line summary. By Turn 10 the prompt is 963 tokens long. Two modes: Each number is the median of 5 timed runs of one forward pass plus picking the first token prefill time to first token, which excludes tokenization, scheduling and network : Over all 10 turns, re-prefilling processes 5,549 tokens to read a 963-token conversation, 5.55x the 999 tokens the cached mode computes 868 ms vs 642 ms summed over the 10 turns, 1.35x . The token saving is large, but in this setup the time saving only shows once the prompt passes roughly 500 tokens: below that, every forward pass costs about the same ~65 ms, whatever its length more on that floor in Section 3 . One trap we hit. Qwen3’s chat template ends every prompt with an empty reasoning block, <|im start| assistant\n