On-premises AI
Automated Canary Deployments for On-Premises AI Models
How to release AI models safely on-premises: shadow traffic, canary analysis, A/B tests, rollback triggers and LoRA adapter promotion, with release evidence.
In short
A safe model release moves a new model or adapter through stages: offline evaluation, shadow traffic, a canary that serves a small share of real users, and full rollout, with automatic rollback when agreed metrics breach their thresholds. On-premises, the same pipeline keeps the versioned artefacts and release records that make every change explainable later.
Key takeaways
- Model regressions are statistical and often appear only on real traffic, so compare a new version with the current one on live requests, not only on offline test sets.
- Shadow traffic tests a candidate without exposing users, a canary exposes a small and controlled share of users, and an A/B test measures whether the change improves an outcome.
- Agree metrics, thresholds and rollback triggers before the release, and make rollback a single, tested configuration change.
- A LoRA adapter is valid only for the base model, tokenizer and chat template it was trained with, so it needs its own manifest, gates and rollback path.
- Under the EU AI Act, a substantial modification of a high-risk AI system triggers a new conformity assessment, so decide in advance which model updates are planned and documented.
Why do AI model releases need more than blue-green deployment?
A model can pass every offline test and still perform worse on real traffic, so a release has to compare the new version with the current one on live requests before it takes all of them. Blue-green and rolling updates assume deterministic code that tests can verify before cutover; models break that assumption.
Model regressions are statistical rather than binary. A classifier may shift its decision boundary on rare edge cases. A language model may become more verbose, refuse questions the previous version answered, or lose accuracy on one type of prompt. These effects often appear only under the real distribution of user requests, and only after enough of them.
Rollback is less simple too. Restoring the previous weights does not restore the conditions in which they were validated: if the input data has drifted, the old version may also underperform. And a model release is more than weights. The tokenizer, chat template, quantisation profile, LoRA adapters, system prompts, retrieval configuration and serving engine version can each cause a regression, so each belongs in the release record.
What does a safe release pipeline for AI models look like?
A safe pipeline moves each candidate through stages of increasing exposure, with a gate between stages and a rollback path at every stage. Each stage answers a different question.
| Stage | Question it answers | Who sees the candidate’s output | Typical gate |
|---|---|---|---|
| Offline evaluation | Does it meet our quality, safety and latency thresholds on test sets? | Nobody | Agreed thresholds on domain, safety and regression test sets |
| Shadow traffic | Does it behave as expected on real requests? | Nobody; responses are discarded | Error, latency and output comparison with production |
| Canary | Does it harm real users at small exposure? | A small share of users | Gating metrics within thresholds against a control group |
| A/B test (optional) | Does it improve the outcome we care about? | Assigned user groups | Pre-registered primary metric and guardrail metrics |
| Full rollout | Is it stable at full load? | All users | Continued monitoring, with rollback ready |
Three components make this work: a traffic splitter at the inference gateway that can send, copy and pin requests; a metrics collector that labels every response with the model version that produced it; and a promotion controller that compares canary with baseline and decides to advance, hold or roll back. On Kubernetes, Flagger automates this loop: it shifts traffic to the canary in steps while measuring key indicators, and rolls back when a configured number of checks fail. Our explainer on LLM inference serving covers the serving layer these components sit on.
How does shadow traffic test a model without affecting users?
Shadow traffic sends a copy of each live request to the candidate and discards its response, so you can compare the candidate’s behaviour with production at no risk to users. Flagger documents this as blue/green deployment with traffic mirroring: each incoming request goes to both the primary and the canary, and the canary’s response is discarded.
Shadowing has two limits. First, it is only safe for requests that can be processed twice. Flagger’s documentation says mirroring should be used for idempotent requests, and asks you to consider what happens if a write is duplicated. For AI agents that create tickets, send messages or update records, run the shadow copy with tool calls stubbed or switched to read-only. Second, shadowing doubles the inference work for the mirrored share. On a fixed on-premises GPU fleet, mirror a fraction of traffic rather than all of it, and size the extra capacity with the LLM GPU sizing calculator.
Useful shadow comparisons include error and timeout rates, latency, output length, refusal rate, validity of structured output against its schema, and agreement with the production answer to the same input. A judge model or a sample of human review can score the cases where the two versions disagree.
How should a canary be sized, ramped and judged?
Start with a small share of traffic, increase it in steps, and compare the canary with a control group running at the same time, using a short list of metrics and thresholds agreed before the release. Google’s SRE Workbook defines canarying as a partial and time-limited deployment of a change, together with its evaluation, and calls it effectively an A/B testing process.
The Workbook’s guidance translates well to models:
- Compare against a control, not against last week. Before-and-after comparisons are risky because time is one of the biggest sources of change in observed metrics. Use absolute limits, such as service level objectives, alongside the comparison.
- Keep the metric list short. Choose metrics that reflect problems users would notice; the Workbook suggests perhaps no more than a dozen.
- Make the canary representative. It must be large enough and run long enough to represent the full deployment, and performance defects often appear only under heavy load, so include peak periods.
- Run one canary at a time, so that any regression can be attributed to one change.
For language models, gating metrics usually include errors and timeouts, latency (time to first token and time per output token), refusal rate, structured-output validity, safety filter triggers and, for retrieval systems, whether answers stay grounded in the retrieved sources, as described on our enterprise RAG page. For classifiers, track precision and recall per class: an improvement in overall accuracy can hide a drop on the small class that matters most. Separate gating metrics, which block promotion, from informational ones, which are logged for review, and set thresholds from the normal variation in your production metrics rather than from round numbers.
On-premises services often handle less traffic than public cloud services, which slows a canary down. At 1,000 requests an hour, a 1% canary sees about 10 requests an hour, so the first stage may need hours before a comparison means anything. Start with a larger share, run each stage longer, or use shadow traffic to collect volume first.
Keep each conversation on one version. Assign users or sessions to a version by hashing a stable identifier, or use the session affinity that tools such as Flagger provide through cookies, so that behaviour does not change in the middle of a conversation.
When is an A/B test the right tool?
Use an A/B test when the question is whether a new model is better for users or the business, not merely whether it is safe. An experiment needs a primary metric defined in advance, guardrail metrics, a planned sample size and a statistical method that suits the way you will read the results.
Good primary metrics for generative AI include task completion, the share of generated drafts accepted with few edits, regeneration rate and explicit ratings. Avoid raw engagement metrics such as message count: a confusing model can increase messages without helping anyone. Because outputs vary between runs, paired comparisons, in which both versions answer the same prompt and the same evaluator judges both answers, reduce noise.
Be careful with how results are read. Johari, Pekelis and Walsh show that standard p-values and confidence intervals become unreliable when people monitor a test continuously and decide when to stop based on what they see. Either fix the sample size in advance or use sequential methods that stay valid however often you look. Early reactions to a changed assistant may also differ from settled behaviour, so run long enough to see stable usage.
On-premises experiments have their own constraints. Every variant that is a separate model must stay loaded in GPU memory for the whole test, whatever share of traffic it receives. Logging must respect data protection: in regulated environments, compute aggregate metrics close to the source and store only what the analysis needs, rather than full prompts and responses.
What should trigger an automatic rollback?
Hard failures should trigger rollback immediately, sustained breaches of gating metrics should trigger it within a short window, and slow trends should go to a person. Layering triggers this way matches the response to the strength of the evidence:
- Immediate triggers: crashes, out-of-memory errors, timeouts, failed health checks and corrupted artefacts.
- Short-window triggers: a gating metric outside control limits calculated from recent production history, for a sustained period rather than at a single data point.
- Trend triggers: gradual drift over hours or days, which usually calls for investigation or retraining rather than an automatic switch.
Flagger illustrates the mechanics: each failed check increments a counter, and when the counter reaches the threshold, traffic returns to the primary and the canary is scaled to zero. The SRE Workbook adds the human option: when the canary’s error rate is too far from the control’s, pause and roll back, or contact a person.
Guard against oscillation. If the cause lies outside the model, for example in an upstream data feed or a failing GPU, the rollback target will show the same symptoms, and an automated controller can flip between versions. Check input data health alongside model metrics, apply a cooldown after each rollback, cap consecutive automatic rollbacks, and then hold the most recently approved version until an operator intervenes.
State needs attention too. Pin active conversations to their current version and move only new sessions. Tag response and embedding caches with the model version, or invalidate them. Where model outputs feed downstream processes, flag the items the degraded version handled during the detection window for review, which matters most for regulated decisions.
Finally, rehearse. Store previous validated versions with their tokenizer, preprocessing code, adapters and evaluation reports. If your serving engine cannot swap weights in place, start the rollback version as a separate instance and shift traffic once it passes health checks. Run rollback drills and measure detection time plus execution time, because together they define how long users live with a bad model.
How do you promote and roll back LoRA adapters?
Treat each adapter as a release artefact bound to one base model, with its own manifest, gates and one-step rollback. LoRA freezes the base model’s weights and trains small low-rank matrices instead, which keeps adapters small and lets many of them share one base model.
That sharing is also what makes adapters fragile. An adapter is valid only for the base model revision, tokenizer and chat template it was trained with, and often for a particular quantisation of the base. Record all of these in a manifest stored with the adapter, together with a summary of the training data scope, the evaluation report and the approver, and have the serving configuration read from the manifest. Promotion gates should fail when the tokenizer or template in production differs from the one in the manifest.
Serving engines handle adapters differently. vLLM serves adapters per request on top of a base model: you enable them with --enable-lora, register each one with --lora-modules, and set limits such as max_loras and max_lora_rank. vLLM can also load and unload adapters at runtime through an API, but its documentation warns that this carries security risks and should not be used in production unless the environment is isolated and fully trusted. Load adapters through the release pipeline instead.
Validate adapters under production conditions, with the same batching, concurrency, GPU memory pressure and tenant mix, using golden prompt sets maintained by product owners and a comparison with the previous adapter revision. Then canary the adapter, for example on one tenant or a small share of requests. Rollback should be one configuration change back to the previous revision, which stays stored and addressable by ID for as long as your audit retention requires.
Restrict who can write adapters to production paths. Separate the roles that submit training jobs, approve or sign artefacts, and activate them in production, so that no single person can ship new model behaviour; our AI security work covers tampered and poisoned models. Merging is the other path: the LoRA authors note that the trained matrices can be merged into the base weights, so a merged model adds no inference latency. A merged model is a new full artefact, though, and needs the same gates as any base model refresh.
What evidence should every release leave behind?
Every release attempt should leave a record of what changed, which gates ran with what results, who decided, and what happened afterwards, including any rollback and its root cause. A model registry that marks each version as promoted, rolled back or failed, with its metrics attached, gives operations and audit the same view.
The record matters for regulation as well as operations. Under Article 43(4) of the EU AI Act, a high-risk AI system that undergoes a substantial modification needs a new conformity assessment. For high-risk systems that continue to learn after deployment, changes the provider pre-determined at the initial conformity assessment, and documented in the technical documentation, do not count as substantial modifications. Deciding in advance which kinds of model and adapter updates are planned, and documenting them, is therefore part of release design for high-risk AI systems. Whether a particular update is substantial depends on the system, so confirm borderline cases with legal counsel.
Organisations that run several models benefit from offering release safety as a shared platform capability: the platform team owns traffic splitting, promotion and rollback, while model teams declare their metrics, thresholds and ramp schedules in configuration. SysArt designs and implements this kind of release pipeline as part of on-premises AI implementation and private LLM platforms.
Featured image by Jahhid Fitrah Alamsyah on Unsplash.
Frequently asked questions
What is the difference between shadow and canary deployments?
In a shadow deployment, the candidate model receives a copy of live requests, but its responses are discarded, so users never see them. In a canary deployment, the candidate answers a small share of real requests and those users see its output. Running shadow traffic first is safer: it finds crashes, latency problems and output differences at no user risk, and the canary then measures real impact under controlled exposure.
How long should a canary run for an AI model?
There is no fixed duration. A canary should run until it has seen enough requests to compare its metrics with the control version with confidence, and long enough to cover representative traffic, including peak hours. Low-volume on-premises services need longer stages or a larger canary share: a 1% canary on a service handling 1,000 requests an hour sees only about 10 requests an hour.
When should a model rollback be automatic?
Roll back automatically on hard failures, such as crashes, timeouts or invalid outputs, and on sustained breaches of gating metrics agreed before the release. Send ambiguous trade-offs and slow trends to a person. Add a cooldown and a limit on consecutive automatic rollbacks, because when the cause lies upstream, for example in input data quality, switching models back and forth fixes nothing.
Is an A/B test the same as a canary release?
The mechanics are similar, but the purpose differs. A canary is a safety check that looks for regressions while exposure is small. An A/B test is an experiment that measures whether a new version improves a defined outcome, so it needs a primary metric, guardrail metrics and a planned sample size. Checking results continuously and stopping at the first significant result makes standard p-values unreliable unless you use sequential methods.
How do you roll back a LoRA adapter?
Keep the previous adapter revision stored and addressable by ID, with a manifest that names its base model, tokenizer and chat template. Rollback then means pointing the route or alias back to that revision, ideally one configuration change made through the release pipeline. Avoid loading adapters ad hoc at runtime: vLLM warns that runtime adapter updating carries security risks outside isolated, fully trusted environments.
Does a model update need a new conformity assessment under the EU AI Act?
For a high-risk AI system, a substantial modification requires a new conformity assessment under Article 43(4). For systems that continue to learn after deployment, changes the provider pre-determined at the initial conformity assessment, and documented in the technical documentation, are not substantial modifications. Whether a specific model or adapter update is substantial depends on the system and its intended purpose, so confirm borderline cases with legal counsel.
Sources
- Google SRE Workbook, chapter 16: Canarying Releases · checked 27 October 2026
- Flagger documentation: Deployment strategies (canary, A/B testing, blue/green and traffic mirroring) · checked 27 October 2026
- Johari, Pekelis and Walsh: Always Valid Inference: Bringing Sequential Analysis to A/B Testing (arXiv:1512.04922) · checked 27 October 2026
- Hu et al.: LoRA: Low-Rank Adaptation of Large Language Models (arXiv:2106.09685) · checked 27 October 2026
- vLLM documentation: LoRA Adapters · checked 27 October 2026
- AI Act Service Desk: Article 43, conformity assessment (consolidated text) · checked 27 October 2026