Local LLM throughput is tokens per step times steps per second
TL;DR: I spent a week tuning two local inference setups: Qwen3.8-27B under vLLM on a Radeon AI PRO R9700, and Qwen3-VL 8B under llama.cpp on a 12 GB RTX 4070 Ti. One went from 52 to 105 tokens/s per request and the other from 3.5 s to 1.3 s per photo. Neither win came from a faster model or a magic flag. Both came from treating decode as a memory-bandwidth problem and asking how many useful tokens each pass over the weights produces.
The model in one paragraph
Generating a token means reading every weight in the model once. On a GPU that read is limited by memory bandwidth, not compute, and it costs nearly the same whether the pass produces one token or twenty. So throughput is two numbers multiplied together: how many passes per second the card can do, and how many tokens you keep from each pass.
The ceiling is easy to estimate. The R9700 has about 640 GB/s of memory bandwidth, and a 4-bit 27B model is 18 to 19 GB of weights. That is about 34 passes per second at best and closer to 20 in practice. One token per pass gives 20 to 30 tokens/s, and no flag changes that.
Three levers
- More tokens per pass for one stream. Speculative decoding: a small drafter proposes several tokens, and the big model verifies them in a single pass. You keep however many it agrees with.
- Cheaper passes. A quantization format and kernels that suit the card, so each pass reads less or reads it faster.
- More streams per pass. Batching. Each request keeps its own state in the KV cache, the model itself holds none, so tokens from many requests can be stacked into the same pass.
Which lever matters depends on the workload, and my two were opposites:
| R9700, Qwen3.8-27B | 4070 Ti, Qwen3-VL 8B | |
|---|---|---|
| Server | vLLM | llama.cpp behind llama-swap |
| Requests | 40 to 50k token prompts, two at a time | 2 to 3k tokens each, thousands of them |
| What I care about | Speed of one request | Photos per minute |
| Lever | Longer draft, then cheaper passes | More streams per pass |
| Before | 51.8 tok/s per request | about 3.5 s per photo |
| After | 105.3 tok/s per request | 1.3 to 1.4 s per photo |
The details are in two companion posts, “Doubling decode speed on a Radeon AI PRO R9700 with vLLM” and “Batch photo tagging with Qwen3-VL: eight slots, one KV pool”.
Measure the two terms separately
The most useful thing I did was stop looking at tokens/s in the log and graph the two terms on their own. vLLM exports what you need to Prometheus:
# decode tokens/s per request
increase(vllm:generation_tokens_total[1h]) / increase(vllm:request_decode_time_seconds_sum[1h])
# accepted draft tokens per verification pass
increase(vllm:spec_decode_num_accepted_tokens_total[1h]) / increase(vllm:spec_decode_num_drafts_total[1h])
This mattered twice. Per-position acceptance showed the drafter was still right about 74% of the time at the last position I allowed it, which meant the draft was too short. And when I switched quantization, acceptance per pass went down (2.99 to 2.74) while passes per second went up 38%. Looking at acceptance alone, I would have called that a regression. The product went from 67 to 97 tokens/s.
The log, on the other hand, misled me twice. The Avg prompt throughput line is a 10-second average, not prefill speed. And reasoning tokens count as generation, so a server running flat out at 73 tokens/s looked idle because the answer box was empty.
What caps each lever
- Draft length is capped by the drafter. Past the point where conditional acceptance falls off, longer drafts cost time per pass and return nothing.
- Batching is capped by the KV cache, not the weights. Two 50k-token prompts filled 97% of a 7 GiB pool on the R9700. Eight 3k-token photo requests share a 32k pool on the 4070 Ti with room to spare.
- Batching does not help prefill the same way. Image tokens and long prompts are work per request. Going from one photo at a time to eight gave me 2.6 times the throughput, not 8.
- The client is part of the system. Eight server slots behind a loop that sends one request and waits is one slot.
What I would tell myself a week ago
- Work out the bandwidth ceiling first. If you are already near it, stop tuning flags and change a term in the equation.
- Graph tokens per pass and passes per second separately. A change can move them in opposite directions.
- Make every experiment an A/B you can undo. Same names, same port, separate caches. Switching back should be boring.
- Write down every default you depend on. My longest wait was a 40-minute restart caused by flags I had never set.
- Load models from fast local disk. I was loading from slow network storage, and added a pre-flight step that pulls the models to a local SSD before the server starts.
- Know your request shape before choosing a lever. Long prompts and short prompts want different servers configured in different ways.