Model Deployment & Rollout
Shipping a 140 GB artifact — registries, weight distribution, warm-up, and why canarying a model needs quality gates that a service deployment never does.
#Why this isn't a normal deployment
A container image is a few hundred megabytes, starts in seconds, and is either correct or throws an exception. A model deployment breaks every one of those assumptions.
SERVICE DEPLOY MODEL DEPLOY
200 MB image 70-500 GB of weights
starts in seconds minutes to load into HBM
correctness is binary quality is a distribution
errors are visible regressions are silent
rollback is instant rollback needs the old weights
still resident somewhere
canary on error rate canary on... what, exactly?"Quality is a distribution" means a new model isn't simply right or wrong: it might be better on most prompts, slightly worse on code, and much worse on one rare format, all at once. The last two rows are where teams get hurt. A model that is 4% worse at code generation throws no exceptions and fires no alerts. It just quietly makes your product worse until someone notices in a week.
#The registry
Weights alone are not deployable. A model version is a bundle:
model: support-classifier
version: 2026-08-03-a7f31c
├── weights/ sharded safetensors
├── tokenizer/ config + merges + vocab
├── config.json architecture, dtype, context length
├── generation_config default sampling parameters
├── chat_template EXACTLY the training format
└── metadata
├── base model + commit
├── training data snapshot ID
├── eval results at release
├── quantization recipe
└── engine version compatibility rangeContent-address everything. The version ID should be a hash of the weights plus config. Then "which model produced this output" is answerable exactly, and two deployments claiming the same version are provably identical.
#Distributing 140 GB
Rolling out to 200 replicas means moving 28 TB. Naively, that's 200 concurrent pulls from object storage.
| Method | Throughput | Notes |
|---|---|---|
| Direct from object storage | Limited per-connection; throttled when hundreds of servers pull at once | Fine at small scale |
| Parallel range requests | 5–10× a single stream | The easy first win |
| Regional cache / mirror | Pay egress once per region | Standard for multi-region |
| P2P distribution (Dragonfly, Kraken) | Scales with fleet size | Replicas seed each other; best for large fleets |
| Pre-baked into the node image | Instant | Inflexible; a new model needs a new image |
| Shared network filesystem | One copy | The filesystem becomes a single point of failure and a bottleneck |
Lazy loading is the technique worth knowing. You memory-map the weight file: the operating system treats the file as if it were already in memory, but only actually reads each piece from disk the first time something touches it. So layer 1's weights load when layer 1 first runs, and so on. The server starts accepting traffic almost immediately, and the first few requests are slow while the pieces load. safetensors is a weight format designed for exactly this: the bytes on disk are already laid out exactly as they'll sit in memory, so nothing has to be unpacked or converted (no deserialisation). Together they cut startup from minutes to seconds.
#Warm-up
A freshly loaded model is slow for reasons beyond loading the weights. The GPU library picks and tunes its fastest routines (kernel autotuning) the first time it sees each request shape. Many engines also capture CUDA graphs — a recording of the exact sequence of GPU operations for a given shape, so it can be replayed later without re-issuing each step. Memory pools have to be carved out, and the prefix cache is empty. All of that happens on whoever's request arrives first.
NAIVE WITH WARM-UP
pod ready → traffic pod starts
↓ ↓
first 100 requests are load weights
3-10× slow ↓
↓ run synthetic requests at
p99 spike visible to users representative shapes
↓
pre-populate common prefixes
↓
THEN mark ready → trafficA readiness probe is the check an orchestrator uses to decide a new instance can receive traffic. It must not pass until warm-up completes — and this is a common misconfiguration: the process is listening, so Kubernetes declares it ready and sends users straight into the slow cold requests. The probe should test "warm", not "up".
Pre-populating the prefix cache with your system prompts is worth doing explicitly — otherwise the first N users of each replica pay a full prefill for content that should have been cached.
#Rollout strategy
- 1 Offline eval golden sets, must beat the incumbent
- 2 Shadow mirror real traffic, compare, serve nothing
- 3 Canary 1% real users; watch latency AND quality
- 4 Ramp 5% → 25% → 50%, holding at each
- 5 Full old version stays warm for fast rollback
Shadow mode is disproportionately valuable here and underused. Send real production traffic to the new model, discard its output, and compare against the incumbent's. You get real distribution coverage — the full messy variety of what users actually send, not just the cases in your test set — with zero user risk. What you cannot get from it: anything requiring user feedback, since nobody sees the output.
Canary needs quality signals, not just error rates. A model regression shows up as:
| Signal | Detects |
|---|---|
| Output length distribution | Truncation, runaway generation, format collapse |
| Refusal / safety-trigger rate | Over-alignment (refusing harmless requests) or under-alignment (answering ones it shouldn't) |
| Tool-call validity rate | Structured output degradation — very sensitive |
| Downstream conversion or task success | The thing you actually care about |
| Explicit user feedback (thumbs) | Slow signal, high value |
| Retry and regeneration rate | Users silently telling you the answer was bad |
| LLM-judge score on a live sample | Fast proxy; needs its own validation |
Tool-call validity is the best early indicator in an agentic product. It's binary, high-volume, computable in real time, and extremely sensitive to model changes. A drop from 98% to 94% is unambiguous and shows up within minutes.
#A/B testing models
Beyond canarying, you often want to measure which model is better on live traffic.
- Randomise by user, not by request. Users notice inconsistency within a session, and per-request randomisation contaminates conversation history with two different models' outputs.
- Run long enough for slow metrics. Retention and task-completion signals take days to weeks; latency and validity take minutes.
- Watch for interaction effects. A model that's better in isolation can be worse combined with your prompts, which were tuned for the old one.
- Beware novelty. Users react to any change at first — curious about new behaviour, or annoyed that something feels different. That alone moves engagement metrics for a few days in either direction, so don't judge the winner from the first days' data.
#Multi-model serving
Most production systems serve several models. Two shapes:
Dedicated pools — one model per replica set. Simple, isolated, and you pay for idle capacity per model.
Shared base with adapters — one base model, many LoRA adapters loaded on demand. Enormously more efficient for many fine-tuned variants: 100 customer-specific models in the memory of one, with requests from different customers batching together.
The routing layer then needs to know which model each request wants, keep hot adapters resident, and evict cold ones by LRU — a small caching problem sitting on top of the serving stack.
#Check yourself
Why is a model deploy unlike a service deploy?Show answer
What belongs in a model artifact?Show answer
Why is the chat template the most common silent failure?Show answer
How do you distribute huge weights quickly?Show answer
Why warm up before marking a replica ready?Show answer
What is shadow mode good for?Show answer
Which canary signals catch model regressions?Show answer
How should rollback and A/B testing be set up?Show answer
#What to carry forward
- A model version is weights plus tokenizer plus chat template plus metadata, content-addressed.
- The chat template is the most common silent failure. Ship it with the artifact; assert on token IDs.
- Distribution time is rollback time. P2P or local NVMe caching, decided in advance.
- Warm up before marking ready — CUDA graphs, kernel autotuning, prefix cache.
- Canary on quality signals, not error rates. Tool-call validity is the best fast indicator.
- Shadow mode gives real distribution coverage at zero user risk.
- Randomise A/B by user, not request.