Before a GPU can process a chat request, software must turn the conversation into the model’s input. A chat template serializes roles, messages and tool definitions into the format expected by the model. Tokenization converts that rendered text into token IDs. These operations use CPU resources, as do admission and parts of scheduling. After generation, detokenization converts IDs back into text for streaming. A busy input or output stage can leave an expensive GPU waiting.

Current vLLM optimization guidance identifies input processing, scheduler work and output processing as possible CPU bottlenecks. That makes them hypotheses to measure here, rather than proving tokenization alone is the cause. A dashboard starting at model execution omits the time users spend waiting to reach it.

For a hypothetical slow request, the timeline might be 20 ms for authentication, 800 ms waiting for a tokenizer worker, 120 ms tokenizing and 60 ms on GPU before output begins. Its one-second delay is mostly outside the GPU. Compare this with an otherwise matched pretokenized request. The numbers illustrate the experiment, not an expected tokenizer performance claim.

Put a trace clock at request receipt, template completion, tokenization completion, engine admission, prefill start (GPU processing of the prompt), first token, detokenization and client flush. Compare time distributions by prompt tokens, raw bytes, template version, tenant, CPU host, and arrival burst. A long code file can be expensive to tokenize even if the eventual token count looks manageable. A single-threaded template or a shared process pool can produce a queue while GPUs wait. Check CPU saturation, cgroup limits, run queues, allocator or GC pauses, and scheduling time inside the engine. Measure offered demand and waiting requests, including ones that time out before model admission.

To isolate the stage, replay a permitted sample with a fixed pretokenized input in a test environment and compare it with the ordinary frontend path. Preserve the exact tokenizer and template version so this comparison does not silently change the request. If the frontend is the limit, add appropriately sized CPU workers, keep them near their GPU or NIC where locality matters, and bound the intake queue. Cache only deterministic preprocessing whose key includes the prompt and policy-relevant version. Extra GPUs behind the same saturated frontend will mostly sit idle.

The stream pause changes the investigation. Check per-token engine scheduling, detokenization, serialization, network flush, and client backpressure. It might be the same CPU pool that was slow before prefill, or a separate decode or transport fault. One trace per token can tell us where the first growing gap appears. If model steps become slow under larger batches, the original “unchanged forward-pass time” aggregate was hiding a workload slice. Fix the measured critical path and retest completed answers within both first-token and inter-token targets.