A model cold start is the delay between the arrival of a request and the moment an inference service can answer it when no warm model instance is ready, because the platform must first allocate compute, start a container, load model weights into accelerator memory and initialize the runtime. In AI infrastructure, the resulting cold start latency ranges from a few seconds for small models to several minutes for large language models whose weights occupy tens or hundreds of gigabytes.
Cold starts matter most in serverless inference and inference autoscaling, where instances are created on demand and removed when idle. The design question is a cost-latency trade-off: keeping GPUs warm removes the delay but pays for idle hardware, while scaling to zero saves money and exposes users to slow first responses.
What happens during a model cold start
A model cold start consists of several sequential stages, and the total delay is the sum of their durations. Each stage has a different bottleneck, so effective optimization starts with measuring which stage dominates in a given deployment.
| Stage | What happens | Typical duration |
|---|---|---|
| Node provisioning | Scheduler finds or creates a GPU machine | Seconds to several minutes |
| Image pull | Container image with runtime and libraries downloads | 10 s to 2 min for multi-GB images |
| Weight download | Model files copy from object storage or a registry | Seconds to minutes, size dependent |
| Weight loading | Tensors move from disk into GPU memory | Bounded by disk and PCIe bandwidth |
| Runtime initialization | CUDA context, kernel compilation, graph capture | A few seconds to over a minute |
| Warm-up | First requests fill caches and allocators | One or more slow requests |
For large language models the weight transfer stages dominate. A 70-billion-parameter model stored in 16-bit precision occupies roughly 140 GB, and moving that volume across a network at a few gigabytes per second takes about a minute before any loading or initialization begins.
Factors that determine cold start latency
Cold start latency depends mainly on model size, storage location and runtime behavior. Doubling the parameter count roughly doubles the bytes to move, while the storage tier decides how fast those bytes arrive.
| Factor | Effect on cold start | Typical lever |
|---|---|---|
| Model size | Larger weights take longer to transfer and load | Quantization, smaller variants |
| Storage tier | Remote object storage is slower than local NVMe | Caching weights on node disks |
| Weight format | Memory-mappable formats load faster than pickled files | Safetensors and similar formats |
| Container image size | Large images delay the start of the process | Slim base images, layer caching |
| Compilation steps | Graph capture and kernel tuning add seconds | Ahead-of-time compiled artifacts |
| GPU availability | Scarce capacity can add queueing time | Reserved or provisioned capacity |
Runtime choices also matter. Inference servers that capture CUDA graphs or preallocate a large KV cache pool trade a longer startup for faster steady-state serving, so a configuration tuned for throughput can lengthen the cold start noticeably.
Cold start compared with related latency metrics
Cold start latency is a one-time cost per instance, which distinguishes it from per-request metrics such as time to first token. Confusing the two leads to misleading dashboards, because a single cold start can inflate tail latency percentiles while average latency looks healthy.
| Metric | What it measures | When it occurs |
|---|---|---|
| Cold start latency | Time to bring a new instance to readiness | Scale-up from zero or new replica |
| Time to first token | Delay before the first output token | Every request, mainly prefill |
| Time per output token | Speed of the decode phase | Every generated token |
| Queueing delay | Wait before a request reaches a free instance | Under load or during scale-up |
In practice a user who triggers a cold start experiences cold start latency plus queueing plus time to first token. Monitoring should therefore tag requests served by freshly started instances so that tail latency analysis can separate infrastructure delays from model performance.
Techniques to reduce or avoid cold starts
Teams reduce cold starts either by making startup faster or by making it rarer. The first approach shortens each stage; the second keeps capacity ready ahead of demand.
- Minimum warm replicas keep at least one instance running, removing cold starts for baseline traffic at a fixed idle cost.
- Local weight caching on node NVMe disks or a shared cache layer avoids repeated downloads from object storage.
- Streaming weight loading starts transferring tensors to the GPU while the download continues, overlapping stages.
- Snapshot and restore of an initialized process or GPU memory state skips runtime initialization on later starts.
- Predictive autoscaling adds replicas ahead of expected peaks instead of reacting after requests queue.
- Multi-LoRA serving keeps one warm base model and swaps small adapters, so new fine-tuned variants avoid full cold starts.
The right combination depends on traffic shape. The decision table below summarizes common situations and recommended strategies.
| Situation | Recommended strategy | Reason |
|---|---|---|
| Steady interactive traffic | Keep warm replicas | Latency matters and idle time is short |
| Rare, bursty internal use | Scale to zero with caching | Idle GPU cost outweighs occasional delay |
| Predictable daily peaks | Scheduled pre-warming | Capacity is ready before demand arrives |
| Many fine-tuned variants | Shared base with adapters | Avoids loading full weights per variant |
Common mistakes when managing cold starts
The most frequent mistake is testing only with warm instances. Load tests that run against an already scaled deployment never measure the delay real users meet after idle periods, so service level objectives look met until production traffic drops and rises again.
Other errors include setting aggressive scale-down timers that remove instances minutes before the next request, health checks that report readiness before warm-up completes, and client timeouts shorter than the realistic cold start, which turn a slow response into a failed one and trigger retry storms that start even more instances.
In plain words
Think of a restaurant kitchen that closes its ovens when nobody is ordering. The first customer after a quiet hour must wait while the ovens heat up. Later customers get their food quickly.
An AI model works the same way. When no copy of the model is running, the system must find a machine, copy the model and get it ready. That wait is the cold start. Keeping a copy running avoids the wait but costs money even when nobody uses it.
A real-world example
A legal technology team serves a document summarization model with 13 billion parameters on a serverless GPU platform that scales to zero after ten minutes of inactivity. Lawyers use the tool mostly in the morning, and the first request of each session often waited about 90 seconds, while warm requests returned in under three seconds.
Measurements showed that roughly 60 seconds came from downloading weights from remote object storage and the rest from container startup and CUDA initialization. The team cached the weights on local NVMe disks, converted them to a memory-mappable format and scheduled one replica to start at 7:45 each weekday.
After the change, a cold start that still occurred took about 20 seconds, and morning users almost never met one. The added cost of the scheduled replica was a few GPU-hours per week, which the team judged far cheaper than keeping a replica warm around the clock.