Inference Batching, Streaming, and GPU Capacity
Inference capacity depends on model size, sequence length, concurrency, batching, and accelerator memory. Processing input tokens and generating output tokens have different performance characteristics. Batching improves accelerator utilization but can increase queue delay; continuous batching can improve utilization while admitting and retiring sequences dynamically.
Streaming partial output improves perceived latency but introduces cancellation, partial-response, and billing semantics. Decide whether generation should stop when the client disconnects and how incomplete outputs are represented. Autoscaling model servers may be slower and more expensive than scaling stateless APIs, so admission control and capacity headroom are important.
Track time to first token, tokens per second, queue delay, errors, GPU memory, utilization, and cost per completed request. Avoid accepting unlimited queued prompts during provider or GPU overload.
- Batching trades utilization against queueing latency.
- Streaming requires cancellation and partial-result semantics.
- Track inference-specific metrics, not only HTTP latency.