Part III / Inference Engineering
From one GPU to a fleet
A fast kernel is not a service. A service must place models, absorb bursts, isolate workloads, recover from failure, preserve version semantics, and meet SLOs across a changing arrival distribution.
Hardware and warm state available before demand arrives.
Routing, autoscaling, health, versions, and overload.
Benchmark and production telemetry tied to workload and SLO.
A power grid, not a stopwatch
A generator can be efficient at steady state and still fail a city if it cannot start quickly, route around outages, or cover the evening peak. Inference fleets have the same distinction between component efficiency and service capacity.
Fleet engineering turns a latency-throughput curve into dependable capacity across time. Utilization, headroom, startup, routing, and failure domains determine whether benchmark speed becomes availability.
The unit of deployment might be a full-model replica, a tensor-parallel group, a pipeline, a prefill worker, a decode worker, or a collection of experts. The control plane tracks model and runtime versions, loads weights, advertises capacity, routes requests, drains unhealthy workers, and scales pools. The data plane moves prompts, KV state, tokens, and tool traffic.
Daily production plus bursty rollouts
The incident-reasoning service has predictable weekday traffic and a strict interactive SLO. Researchers also launch irregular RL jobs that can consume ten times the normal token volume for several hours. Both need the same large policy version, but their latency and priority contracts differ.
A useful design reserves a warm baseline for production and lets background pools autoscale or use preemptible capacity. The scheduler can borrow idle production headroom with a fast eviction policy, but research work must not make interactive tail latency unpredictable. Separate queues and quotas create control; shared weights and caches create efficiency opportunities.
Maximum benchmark throughput matters less if demand is low most of the day or autoscaling cannot reach the capacity in time. In the Modal/Cognition conversation, the speakers emphasize utilization over a 24-hour cycle, a blend of fixed and autoscaled capacity, and workload-dependent placement on the latency-throughput frontier.[source] Those are attributed practitioner observations, not universal percentages.
Disaggregate when phases interfere
Prefill and decode have different compute shapes and SLOs. Serving them on the same worker is simple and avoids moving KV state, but long prefills can delay decode. Prefill-decode disaggregation assigns phases to separate pools, then transfers KV state or a representation between them.
Splitwise studies phase splitting across hardware pools.[source] DistServe develops disaggregation around goodput and per-phase SLOs.[source] The benefit is independent scaling and less interference; the cost is KV transfer, network topology, routing complexity, failure handling, and extra queue boundaries.
| Architecture | Benefit | New cost | Good fit |
|---|---|---|---|
| Colocated phases | Simple; no KV network hop | Prefill/decode interference | Moderate context and homogeneous workloads |
| Disaggregated phases | Independent scaling and phase SLO control | KV transfer and two-stage scheduling | Long prompts or strongly different phase demand |
| Separate workload pools | Isolation and tailored frontier points | Lower pooling efficiency | Interactive plus bulk rollout traffic |
Autoscaling has a memory
Serverless language suggests capacity appears on demand, but large-model startup includes provisioning, container or process initialization, weight transfer from storage, device loading, kernel compilation or graph capture, health checks, and cache warmup. A cold worker may arrive after a short burst has ended.
Scale on leading indicators where possible: queue depth by token, arrival rate, predicted work, KV pressure, and SLO slack. Request count is weak because one 100,000-token prompt differs from one 50-token prompt. Maintain headroom for failure and bursts. Scale-in must drain or migrate stateful sequences; killing them converts efficiency into failed requests.
Observe the request, model, and fleet together
Request traces need queue time, prefill time, TTFT, decode step timing, output length, cache behavior, tool gaps, cancellation, and termination. Worker metrics need model/version, batch tokens, memory, achieved bandwidth and compute, collectives, errors, and health. Fleet metrics need offered load, goodput, saturation, autoscaling lag, cold starts, retries, and capacity by failure domain.
Use high-cardinality identifiers carefully: request IDs and policy versions are essential for tracing, but raw prompts and tool results may be sensitive. Record content hashes, length, classification, and governed samples rather than indiscriminately logging private text. Observability is part of the data-governance boundary.
Reliability includes numerical and semantic health. A worker can return HTTP 200 while emitting corrupted logits after a bad kernel or mismatched tokenizer. Canary prompts, checksum/version validation, distribution monitoring, and task-level probes complement process health checks.
Benchmark as an experiment
Record model, tokenizer, precision, runtime commit, kernel flags, hardware, interconnect, parallel layout, scheduler, cache settings, speculative configuration, prompt/output distributions, arrival process, concurrency, warmup, and measurement window. Report TTFT, ITL, end-to-end latency, throughput, goodput, memory, errors, and cost at several offered loads.
Compare Pareto curves, not one cherry-picked point. Hold quality constant or report its movement. Distinguish synthetic maximum throughput from sustainable production goodput. Re-run after policy updates because response length, tool use, and speculative acceptance can change workload shape.
Capacity planning begins with a demand distribution and an SLO. "One GPU serves model X" is not a capacity statement until prompt length, output length, concurrency, precision, and target latency are specified.
Fast SLOs and slow startup require warm headroom. Autoscaling changes how much idle capacity you buy and when, but cannot violate provisioning and model-loading time.
Operate versions as immutable products
A serving release binds weights, tokenizer, prompt template, adapters, runtime, precision, speculative components, and decoding defaults. Roll out with canaries, compare quality and system metrics, support rollback, and keep old capacity long enough for active sessions. If prefix caches or KV state cross versions, define compatibility explicitly.
For RL rollouts, version consistency is even more important: the generating policy and runtime must match logged probabilities and training metadata. A fleet that silently updates workers mid-batch can produce a mixed behavior policy under one label.
References
- Splitwise and DistServe are primary disaggregation sources.
- Kiely's book supports the end-to-end production scope.
- The Gong/Alberti conversation supplies attributed practitioner observations about utilization, capacity, and autoscaling.