Guide

Plan a deployment

Start from the workload

Before choosing anything, write down the workload and goals. That means peak traffic, prompt and output lengths, SLOs with percentiles, and the budget. A live chat needs a fast first token, while an overnight batch job only cares about total time and cost. Long prompts make prefill the main cost; long answers make decode the main cost.

Choose model and GPU

Do the memory math first. Weights are parameters × bytes each: 8B in BF16 is about 16 GB, and 70B is about 140 GB. Add the KV cache you need and some overhead, and check it fits. If it doesn't, split the model over GPUs, use 4-bit weights and test quality, or pick a smaller model. Then test that the latency goal holds.

Choose engine features

Turn features on for the workload, not by habit. Prefix caching helps when many requests share a long prompt, and prefix-aware routing makes it work across replicas. Chunked prefill keeps streams smooth when long prompts arrive. Speculative decoding speeds up tokens at low load, but helps less when big batches already use the GPU.

Plan capacity

Load test one replica with real prompt and answer lengths, and find its knee at the SLO. Replicas = peak rate ÷ that rate, plus headroom for spikes and for a replica that fails.

Operate and improve

Ship with metrics and alerts on queue depth, KV cache use, TTFT and ITL percentiles, and errors. Find the biggest bottleneck, change one thing, and compare before and after on the same load test. Check answer quality as well as speed, and judge by the SLO percentile, not the median.

Remember

  • Goals first, hardware second.
  • The memory math rules out what can't fit.
  • Each feature fits a workload; measure it.
  • Size for peak plus headroom.
  • One change at a time, measured.