DEV Community

shashank ms
shashank ms

Posted on

Demystifying Cold Starts in LLM Inference

Every millisecond of latency in LLM inference is a millisecond of user friction. One of the most common sources of unexpected delay is the cold start: a request that arrives before the model weights are loaded into GPU memory, forcing the infrastructure to fetch gigabytes of parameters from disk or CPU RAM before a single token can be generated. For agentic workflows, multi-turn conversations, and real-time assistants, these pauses do not just slow things down. They break flow.

What Are Cold Starts in LLM Inference?

A cold start occurs when an inference server receives a request for a model that is not currently resident on a GPU. Modern LLMs require tens to hundreds of gigabytes of weights in low-latency VRAM. If a provider uses dynamic scaling, shared multi-tenant clusters, or scale-to-zero architectures to save on GPU hours, the first request after an idle period must wait for the entire model to be loaded. This can add seconds to time-to-first-token (TTFT), independent of the actual generation speed.

Why Cold Starts Happen

The root cause is almost always resource efficiency. Providers like Together AI, Fireworks AI, OpenRouter, Replicate, and Anyscale operate large shared fleets. Keeping every model variant hot on dedicated GPUs at all times would be prohibitively expensive, so many platforms dynamically allocate capacity. When demand for a specific model drops, its weights are evicted to make room for others. The next request pays the loading cost.

Other factors compound the problem. Quantized models still require massive memory footprints. Tensor parallelism and pipeline parallelism split weights across multiple GPUs, so a cold start may involve orchestrating several devices at once. Network storage for model artifacts adds yet another variable.

The Real Cost of Cold Starts

A cold start is not just a one-time inconvenience. In agentic systems that chain multiple tool calls, each hop is a fresh opportunity for a model to be evicted and reloaded. A coding assistant that streams reasoning tokens can feel broken if the first chunk takes five seconds to appear. For long-context workloads, the user already waits for prefill computation; adding a cold start on top compounds the delay.

From an architectural perspective, cold start variance makes capacity planning harder. You cannot reliably predict end-to-end latency if TTFT depends on whether a pod happened to be idle.

How Providers Mitigate Cold Starts

Common strategies include keep-alive traffic, always-on replicas for popular models, predictive auto-scaling, and tiered caching. Some platforms offer provisioned throughput or reserved capacity, but these typically shift the cost model toward hourly GPU billing. That tradeoff makes sense for steady traffic, yet it penalizes sporadic or bursty workloads.

Another approach is model weight streaming and demand paging, loading only the layers needed for the current forward pass. While elegant, this adds system complexity and can hurt throughput.

Oxlo.ai and Predictable Inference

Oxlo.ai takes a different approach: no cold starts on popular models. The platform keeps in-demand weights hot in GPU memory, so your first request of the day behaves like your hundredth. This is paired with a request-based pricing model. Unlike token-based providers where cost scales with input length, Oxlo.ai charges one flat cost per API request regardless of prompt size. For long-context and agentic workloads, this can be significantly cheaper than token-based alternatives.

Oxlo.ai hosts 45+ open-source and proprietary models across seven categories, including DeepSeek R1 671B MoE, Llama 3.3 70B, Qwen 3 32B, and Kimi K2.6. The API is fully OpenAI SDK compatible, so switching is usually a single line change.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oxlo.ai/v1",
    api_key=os.environ["OXLO_API_KEY"]
)

# Popular models are kept hot; no cold-start penalty
response = client.chat.completions.create(
    model="deepseek-r1-671b",
    messages=[{"role": "user", "content": "Explain cold starts in LLM inference"}],
    stream=True
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

The stream=True parameter returns tokens immediately because the model is already resident. There is no need to provision capacity or send artificial keep-alive traffic.

When to Evaluate Your Inference Provider

If you are building production agents, coding assistants, or chat interfaces, measure TTFT across different times of day. Sporadic jumps from hundreds of milliseconds to several seconds are a clear signal of cold starts. Check whether your provider bills for provisioned capacity, and whether long prompts are pushing you into higher token-based tiers.

Oxlo.ai offers a free tier with 60 requests per day across 16+ models, including a 7-day full-access trial. It is a straightforward way to test whether zero cold-start latency changes your application experience.

Conclusion

Cold starts are an infrastructure detail with outsized product impact. They introduce jitter into latency budgets, complicate agent design, and quietly degrade user trust. Oxlo.ai eliminates cold starts on popular models and pairs that reliability with flat, request-based pricing. For teams shipping latency-sensitive or long-context applications, that combination makes Oxlo.ai a genuinely relevant option. See the pricing page for plan details.

Top comments (0)