Upgrade a local LLM by promoting a tested artifact with an explicit release identity. Keep the previous model and configuration available, compare both on the same fixtures, and rehearse one rollback before switching traffic.
Record a release identity wider than the model name
Your release record should include the weight artifact, tokenizer, chat template, runtime build, application prompt and generation settings. Pair the artifact digest with the complete application configuration. An unchanged checkpoint can behave differently if the template or context settings change around it.
Make the old and new configurations separately selectable. Use names such as app-previous and app-candidate in your test harness, and keep production on its approved configuration during evaluation. Do not let a scheduled download update the serving alias while you are collecting baseline results.
| Release component | Record | Regression to check |
|---|---|---|
| Weights and quantization | Digest or pinned repository revision | Accuracy and memory fit |
| Tokenizer and template | Files from the approved snapshot | Prompt length, role handling and tool syntax |
| Runtime | Installed build or version | API response and loading behavior |
| Application prompt | Version and output requirements | Missing fields and invented answers |
Preserve an Ollama model and verify its digest
Ollama's GET /api/tags response includes a full digest for each local model. Its copy endpoint creates another model name from an existing model. For an installed qwen3:4b, these commands save the listing, create a retained name, and capture its configuration on macOS or Linux:
curl --fail http://localhost:11434/api/tags -o before-models.json
curl --fail http://localhost:11434/api/copy \
-H 'Content-Type: application/json' \
-d '{"source":"qwen3:4b","destination":"app-previous"}'
curl --fail http://localhost:11434/api/tags -o retained-models.json
curl --fail http://localhost:11434/api/show \
-H 'Content-Type: application/json' \
-d '{"model":"app-previous"}' -o previous-config.json
Compare the source digest in the first listing with the retained model's digest in the second before proceeding. The show response includes the template, parameters and model details. Retain both the underlying model installation and these JSON records so rollback can restore the weights and configuration together.
For digest-based release pinning, store the approved full digest in your release configuration and check the serving name against it before accepting requests. Treat a mismatch as a deployment failure. A copied alias is useful for rollback, but it remains a name you could overwrite. The digest check makes that accidental replacement detectable.
Use the documented listing and copy interfaces for this workflow rather than Docker-style model@sha256:... pull syntax. If you need a separate artifact archive, preserve the exact model files and their configuration under your backup procedure, then prove that procedure works on a test installation.
Pin Hugging Face downloads to a full revision hash
Hugging Face Hub downloads accept a revision that can name a branch, tag or commit. Use the full commit hash for a release record. A branch name can move; the download guide explicitly calls for the full hash rather than an abbreviated commit identifier.
With the Hugging Face CLI installed, copy the reviewed full commit hash from the repository's history into this command. Replace FULL_REVIEWED_COMMIT_HASH with that hash:
hf download Qwen/Qwen3-Coder-30B-A3B-Instruct \
--revision FULL_REVIEWED_COMMIT_HASH \
--local-dir ./candidate-snapshot
Downloading the repository snapshot keeps weights, tokenizer and configuration tied to the same revision. If you select individual files to save space, document the complete required set. For a quantization published in a different repository, pin that repository's revision too and retain its stated upstream provenance.
The equivalent Python API is snapshot_download(repo_id=..., revision=...). Keep the old snapshot in a different directory until the new release is accepted. Point the runtime at the approved local directory rather than resolving a moving remote branch each time it starts.
Try it on your workload
Replay stored fictional fixtures against both revisions with identical prompts and context settings. Include a normal answer, missing information, a long input near your configured limit, structured output, and a mock tool call. Compare JSON validity, factual accuracy, answer length and elapsed time. Preserve raw outputs so a reviewer can distinguish a genuine regression from a changed scoring rule.
Use a concrete gate before you look at results. For example, require all ten mandatory schema cases to pass, no invented commitments in ten factual cases, and a response time within your application's existing target. Set those acceptance criteria before running the candidate. Record the candidate's token counts because a more verbose answer can change both waiting time and hosted cost.
Switch the test application to the candidate, run the fixtures, then restore the old model, prompt and tokenizer together. Run the fixtures again. Confirm that the old artifact still loads and the digest or revision matches your record. Measure rollback time from the operator action to a successful response, including model loading.
Test a deliberate digest mismatch as well. Your release check should stop the application from serving the unexpected artifact. This exercise is more useful than recording a hash that nobody ever compares.
How to decide
Promote only after the candidate passes the application's acceptance tests and the rollback rehearsal succeeds. Keep the old release for an explicit recovery period. If a change fails, isolate weights, template, runtime and prompt one at a time rather than changing several together and losing the explanation.
Run ten upgrade-check agents for under half a cent
Ten upgrade-check agents comparing fixtures on openai/gpt-oss-20b cost about 0.44 cents in tokens on TrustedRouter. In this illustrative evaluation, each agent handles ten of 100 fixtures, each using 2,000 input and 500 output tokens. On 2026-11-22, catalog prices rounded to $0.01 per million input and $0.0475 per million output tokens. Input = 10 × 10 × 2,000 = 200,000; output = 10 × 10 × 500 = 50,000. Cost = 0.2 × $0.01 + 0.05 × $0.0475 = $0.004375, about 0.44 cents.
On one local GPU, those agents share its throughput, and requests beyond its parallel capacity wait in line; through a per-token API they can run concurrently, with the same token bill as running them one after another. Use hosted answers as a behavioral reference while evaluating local revisions. Keep local digest and quantization records as the authority for the artifact you deploy, and score every candidate with the same acceptance rules.
Prices change; check current models, agent setup and API setup. For approved remote fixtures, review confidential inference and eligible route prices. Local remains better when evaluation fixtures cannot leave the device.
Sources
- Ollama: local model listing and full digest field
- Ollama: copy and show API contracts
- Ollama: template and runtime parameter configuration
- Hugging Face: full revision hashes and snapshot downloads
- Hugging Face: download CLI revision and local-directory options
- TrustedRouter: current catalog pricing