A model can fit on a GPU and still perform poorly as a service. Long prompts delay other requests, KV caches compete for memory, and reserved accelerators may sit idle while other jobs queue. Serving performance depends on the request mix, model execution and how the GPU fleet is allocated.

1. How inference runs

Workload characteristics

I'd start with input and output token distributions, arrival rates, concurrency, latency targets and shared-prefix frequency. A document-extraction pipeline spends much of its time processing prompts. Coding agents may reuse long instructions across turns. An interactive assistant needs a short time to first token; offline extraction often values cost per completed document.

Inference stack from applications to GPU execution

Prefill, decode and request scheduling

Prefill processes input tokens and builds the key/value (KV) cache. Decode reads and extends that cache while generating tokens. During decode, each active sequence generally advances by one token per iteration.

Prefill and decode share a KV cache

Continuous batching changes which requests participate in each iteration. New requests enter while others decode; finished requests leave instead of occupying a fixed batch slot.

Three requests entering and leaving a continuous batch

This is a schematic timeline, not an engine trace. An actual iteration may process many requests together, and chunked prefill divides long prompts across iterations. Admission control must account for queue depth, KV-cache capacity and latency. Otherwise a burst of long prompts can delay ongoing decoding.

Paged KV allocation reduces fragmentation. Prefix caching avoids recomputing repeated prompt prefixes when the cache is retained and requests reach a worker that can reuse it. A prefix-cache hit saves prefill computation but does not eliminate the cost of generating the answer.

Serving software

vLLM provides continuous batching, KV-cache management, prefix caching and distributed execution options. SGLang also provides LLM serving, with RadixAttention for prefix reuse and support for constrained outputs. I'd compare their queueing, cache reuse and p95 latency using the same models and traffic.

TensorRT-LLM provides optimized inference execution for supported NVIDIA GPU and model configurations. Model coverage, quantization options, build steps and the hardware generation matter when evaluating it.

NVIDIA Triton Inference Server handles serving and model management across multiple kinds of models and execution backends. NVIDIA Dynamo provides distributed routing and serving mechanisms, including KV-aware placement and disaggregated serving where supported. Triton language is unrelated to Triton Inference Server: it compiles GPU kernels.

Quantization reduces weight memory and, in supported configurations, compute or KV-cache memory. I would check output quality alongside latency. Speculative decoding proposes tokens using a cheaper draft process and verifies them with the target model; performance depends on acceptance rates and the relative cost of drafting and verification. Neither optimization helps every model or workload.

2. Scaling model execution

Tensor, pipeline and data parallelism

Tensor parallelism divides computations within layers across GPUs. Each GPU stores a weight shard and collective operations combine partial tensor results. Pipeline parallelism places successive groups of layers on different GPUs and transfers activations between stages. Data parallelism adds independent model replicas; expert parallelism distributes experts in mixture-of-experts models.

Tensor and pipeline parallelism with a two-request decode schedule

In the decode example, both GPUs in a tensor-parallel group participate in each step. Requests are not allocated one per GPU. If the model fits comfortably on one GPU, independent replicas may be more efficient than splitting it.

GPU memory and concurrent requests

Suppose a model takes 60 GB of weights on one GPU and the runtime reserves 8 GB. An 80 GB GPU has 12 GB left for KV cache. Assume each request occupies 2 GB of KV cache and ignore compute and bandwidth limits for now: memory permits six active requests.

Worked GPU memory budget with weights runtime and KV cache

The 2 GB figure is hypothetical. KV memory depends on architecture, retained context, precision and concurrent sequence lengths. Engines also allocate KV pages dynamically and may share cached prefixes.

A100 H100 H200 and GB200 per-GPU memory capacity and bandwidth

Selected per-GPU specifications: A100 SXM, 80 GB HBM and about 2.04 TB/s; H100 SXM, 80 GB and 3.35 TB/s; H200 SXM, 141 GB and 4.8 TB/s; and a Blackwell GPU in a GB200 system, 186 GB and about 8 TB/s. Sources: NVIDIA A100, HGX specifications, H200 and GB200 NVL72.

With the same hypothetical 60 GB model and 8 GB runtime budget, H200 has 73 GB left for KV cache and a GB200 GPU has 118 GB. At 2 GB per request, the memory-only ceilings are six requests on A100/H100, 36 on H200 and 59 on GB200. Those are not requests-per-second or equal-latency comparisons. Compute, memory bandwidth and scheduling may constrain throughput much earlier.

A 300 GB model on GB200 versus A100

A model with 300 GB of weights cannot fit on one GB200 GPU. A two-way tensor-parallel split places roughly 150 GB on each GB200 GPU, leaving 36 GB per GPU before runtime and KV allocations. An eight-way split over A100 80 GB GPUs places 37.5 GB of weights on each. Four A100 GPUs would leave only 5 GB per GPU for everything else.

A 300 GB model spread over two GB200 or eight A100 GPUs

During layer execution, GPUs compute on their local shards and exchange partial results using collectives such as all-reduce or all-gather. They do not send the full weights at each token step. An eight-GPU A100 server can communicate through NVLink/NVSwitch; a model-parallel group crossing nodes also uses the network fabric, commonly InfiniBand. The two Blackwell GPUs in a GB200 superchip communicate via NVLink, and GB200 NVL72 provides a larger NVLink domain.

Pipeline-parallel stages pass intermediate activations instead. That changes communication frequency but can introduce idle stages. Model size, batch size, hardware topology and synchronization costs determine which configuration performs better.

Separating prefill and decode

Long prefill work can interfere with decoding. Separate worker pools allow different capacity and model-parallel configurations for the two phases.

Prefill workers transferring KV state to separate decode workers

KV state has to move between pools, which adds network transfer, coordination and additional failure cases. I would benchmark combined prefill/decode workers first and use disaggregation when the traffic mix shows significant interference.

3. Operating production inference

Routing and autoscaling

Routing selects model version and replica, balancing queue delay against prefix-cache locality. Concentrating similar requests on one worker can improve cache reuse but overload that worker; spreading requests may waste prefill computation.

Routing based on KV-cache locality and queue depth

Autoscaling should use queue depth, active sequences, KV-cache pressure and tail latency alongside GPU metrics. If replica startup takes minutes, additional pods cannot immediately absorb a burst. Multi-model placement also needs model-specific traffic forecasts, GPU compatibility and isolation requirements.

Cold starts and readiness

Adding a serving replica may require GPU placement, artifact retrieval, weight loading, runtime initialization and warm-up.

Cold-start sequence from placement to model readiness

Container startup is not model readiness. The worker should pass model initialization and a test inference request before joining routing. Node-local weight caching, warm replicas and ahead-of-demand scaling can reduce the delay. Capacity reservations also need to account for how long a reclaimed GPU takes to become inference-ready. Scale-to-zero suits asynchronous or infrequent workloads better than strict first-token SLOs.

Failure recovery

Error rates, health checks, OOM events and timeouts identify unhealthy replicas. The router stops sending them new requests while replacement workers load and warm up.

Failure detection worker replacement and routing recovery

Streaming generation may not resume exactly after a failure. Retries must be bounded; repeated agent calls can be unsafe if a tool action has already produced side effects.

Model promotion

Deploying a new model or serving configuration is separate from restarting a failed worker. Promotion requires correctness tests, structured-output checks, latency and throughput measurements, canary traffic and rollback.

Model validation canary rollout and rollback

Quantization changes, decoding parameters and engine upgrades may change both output quality and serving behavior. Keep a known-good version available during rollout.

4. Managing a GPU fleet

Sharing capacity between training and inference

A GPU cluster may run training, evaluations, research and inference. Fixed partitions can leave GPUs idle while other workloads queue. Spare capacity can support checkpointable training and batch jobs without taking away reserved production-inference capacity.

Fleet capacity allocations for inference training and research

Reclaiming a GPU has a cost: training may need coordinated checkpoints and gang placement; inference may require several minutes to reload weights and warm up. Placement policies need both the reclaim time and the latency guarantees.

Scheduling happens at three timescales: request selection inside an inference engine, model-replica placement and scaling, and fleet allocation between workload types. An engine such as vLLM handles request scheduling. Cluster schedulers and orchestration layers contribute mechanisms for the others.

I would track completed training work and inference SLO compliance alongside GPU utilization. Keeping GPUs full by repeatedly evicting training jobs is counterproductive.

Adopt existing components; own the policies

I would start with existing LLM engines, GPU drivers and operators, Kubernetes or a batch scheduler, model storage and standard telemetry. KServe, Ray Serve, Slurm, Kubernetes-native queueing and Dynamo cover different parts of the deployment and scheduling problem.

The internal platform team still owns the decisions those systems cannot infer: model version and approval rules, workload priorities, reservations, quotas, admission control, traffic routing, budgets and rollback policy. It also needs cost attribution by team and model, operational ownership, and isolation and retention controls for sensitive scientific or clinical requests.

Control plane and inference request path

Write a custom scheduler only when existing components cannot express an important requirement.

5. Measuring performance

Latency and throughput

Time to first token (TTFT) includes queueing and prefill. Time per output token (TPOT) measures the cadence of streamed tokens, while end-to-end latency includes the complete request. I'd report p50 and p95/p99 latency at a specified offered load, alongside successful requests/s and generated tokens/s.

For interactive requests, queueing and long prefill operations often dominate the first-token experience. For long outputs, decode cadence matters more. High throughput does not imply good tail latency; increasing concurrency can make throughput rise while individual requests get slower.

Benchmark design

I would compare independent short prompts, long prompts with short outputs, and multi-turn requests sharing a prefix. Hold model version, GPU type, precision, sampling settings and input/output length distributions constant across engines.

Measure KV-cache pressure, GPU memory and bandwidth, queue delay, errors, structured-output validity and output quality. For fleet scheduling, add idle reserved capacity, training queue time, eviction/restart overhead, model cold starts and cost per completed workload. A model change that improves token throughput but harms task quality is not necessarily an improvement.

Diagrams generated using AI.