The CPU budget behind every generated token
A GPU step depends on scheduling and request-state work around it. Overlap helps only when that work can stay ahead of the device.
Long-form writing from turingfold on inference engineering: explainers, opinions and notes on serving AI models in production.
A GPU step depends on scheduling and request-state work around it. Overlap helps only when that work can stay ahead of the device.
A quantized model can serve more requests without making one request much faster. Separate execution gains from capacity gains before judging it.
A warm replica can save prefill work and still make a request wait longer. A simple latency budget explains when cache affinity should give way.
A prefill token budget determines how new prompts share execution with active generations. Tuning it decides where users spend their waiting time.
Reusing a prefix replaces computation with data movement. The useful decision compares exposed transfer time with the prefill work it avoids.
Greedy outputs can change when batch composition changes. Trace the first divergence, then define the reproducibility guarantee your service needs.
Model fit, active-sequence capacity, and sustainable request rate are different limits. A memory budget is only the start of capacity planning.
Batching shares the cost of reading model weights. Each request still brings its own KV state. Context length determines how far that bargain goes.
Your laptop builds a request, GPUs run prefill and decode, and tools loop back. A step-by-step look at one Claude Code message.