Model cold start

Also known as: cold start latency

On this page 7

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.

StageWhat happensTypical duration
Node provisioningScheduler finds or creates a GPU machineSeconds to several minutes
Image pullContainer image with runtime and libraries downloads10 s to 2 min for multi-GB images
Weight downloadModel files copy from object storage or a registrySeconds to minutes, size dependent
Weight loadingTensors move from disk into GPU memoryBounded by disk and PCIe bandwidth
Runtime initializationCUDA context, kernel compilation, graph captureA few seconds to over a minute
Warm-upFirst requests fill caches and allocatorsOne or more slow requests
Stages of a model cold start

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.

FactorEffect on cold startTypical lever
Model sizeLarger weights take longer to transfer and loadQuantization, smaller variants
Storage tierRemote object storage is slower than local NVMeCaching weights on node disks
Weight formatMemory-mappable formats load faster than pickled filesSafetensors and similar formats
Container image sizeLarge images delay the start of the processSlim base images, layer caching
Compilation stepsGraph capture and kernel tuning add secondsAhead-of-time compiled artifacts
GPU availabilityScarce capacity can add queueing timeReserved or provisioned capacity
Main factors and their effect

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 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.

MetricWhat it measuresWhen it occurs
Cold start latencyTime to bring a new instance to readinessScale-up from zero or new replica
Time to first tokenDelay before the first output tokenEvery request, mainly prefill
Time per output tokenSpeed of the decode phaseEvery generated token
Queueing delayWait before a request reaches a free instanceUnder load or during scale-up
Cold start and neighboring metrics

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.

SituationRecommended strategyReason
Steady interactive trafficKeep warm replicasLatency matters and idle time is short
Rare, bursty internal useScale to zero with cachingIdle GPU cost outweighs occasional delay
Predictable daily peaksScheduled pre-warmingCapacity is ready before demand arrives
Many fine-tuned variantsShared base with adaptersAvoids loading full weights per variant
Choosing a cold start strategy

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.