Model and Inference EngineeringEnd-to-end serving and modalitiesStaff
What should model readiness guarantee when rare input shapes still pay cold-start costs?
By Amit Kumar3 min readWorked answer includedReviewed 27 Sept 2026
The question
Interview question
A loaded model passes readiness and serves short prompts quickly. The first long request with images and a tool schema takes 30 seconds, while repeated identical requests on the same replica are fast. Design an investigation and a readiness policy that balances representative warmup against startup time and memory. Distinguish this from waiting for an entirely unloaded model.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
“Ready” may mean the process loaded weights, or that it completed one specific warmup request. It cannot mean every possible prompt shape has been compiled and every cache populated. Start with a timeline for the slow request: queue wait, tokenization and image preprocessing, prompt rendering, compilation or graph capture, memory allocation, prefill, and first output. Compare the first and second request with identical inputs on the same replica, then across fresh replicas. A one-time cost tied to an input shape points somewhere different from general overload. Here a shape describes dimensions such as sequence length, batch size or image size. A specialized kernel is compiled for a supported shape or class of shapes. Graph capture records a sequence of GPU work for compatible replay, so warming one short-text shape need not prepare an image path.
A hypothetical replica could pass its short-text probe at 10:00:00, then receive an image-and-tool request at 10:00:05. If that request spends 25 seconds compiling a previously unused path before ordinary prefill starts, process readiness preceded readiness for that request class. If instead the 25 seconds is a queue behind other work, extra warmup is not the remedy. The repeated-input experiment distinguishes these cases only when replica, load and cache state are controlled.
NVIDIA Triton's model warmup documentation says configured warmup requests run before an instance serves traffic. The effect varies by backend. Completing a short text request does not warm a long multimodal path. Some engines compile shape-specialized kernels or capture graphs lazily, while other bottlenecks come from image decoding, tokenizer initialization or tool-template processing. Verify the actual engine and version rather than assuming the mechanism from the latency pattern.
For a release, choose a bounded set of representative warmup classes from production distributions: short and long text, relevant image resolutions, tool schemas, output modes and batch sizes. Run them on every new replica before advertising full capability. Do not warm every combinatorial shape. That could make deployment take longer than its benefit and consume the very GPU capacity needed for a rolling update. If some rare class still pays a cold-path cost, decide whether to pin a ready pool for that class, prewarm on forecast demand, or offer a truthful asynchronous or degraded path. The readiness contract can be class-specific instead of one boolean for all traffic.
The first bad request may also happen when routing moves it to a replica that never saw that class. A canary on one warmed replica is not evidence that the other hundred are warm. Emit per-replica cold-path counters and latency by input class. If warming is expensive, stagger replicas and hold serving capacity while they prepare. Compare cost of warmup and fleet size with the actual tail benefit.
If the interviewer asks why not simply route the first request and let it pay the cost, the answer depends on the contract. For an internal batch queue, that may be fine. For an interactive SLO, hiding the first user behind “readiness passed” is inaccurate. Scale to zero makes the first model request miss its deadline covers a scale-to-zero request that waits for the whole model to start. This model is loaded and useful for common traffic. Its readiness probe sampled too little of the execution surface.
Related questions
Keep practising model and inference engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux