What Can Go Wrong Between Download and Deploy

Key Takeaways
- •A model download is weights, tokenizer, config, custom code and often a container. Any component can be altered, and some formats execute on load.
- •Examines what is actually in a download, analyzing the structural bottlenecks and trade-offs in real-world deployments.
- •Provides engineering benchmarks and verification criteria for the formats that execute.
Australian Government cyber security guidance published in November 2026 covers provenance, third-party conversions, quantisation, tampered weights, unsafe model formats, data poisoning, hidden behaviours and sandboxed loading.
The list is long because a model download is not one artefact. It is a package of components, and each can be modified, mislabelled or compromised independently.
What is actually in a download
Six components, and most people think about one.
The weights are the tensors. They determine what the model does.
The tokenizer maps text to identifiers. It determines what the model sees.
The configuration describes the architecture: layer count, hidden size, attention pattern. It determines how the weights are interpreted.
Custom code accompanies some models, because the architecture is not in the standard library. It executes on load when the loader trusts the model's own implementation.
Inference libraries and their dependencies are installed to run the model, and each has its own supply chain.
And container images bundle all of the above, which is convenient and hides every component inside one digest.
The formats that execute
This is the failure that surprises people, because it does not look like a model loading problem.
Some serialisation formats can instantiate arbitrary objects when deserialised. A file in such a format can run code as a side effect of being loaded, before any inference happens.
That converts a model download into code execution with whatever permissions the process holds. A machine that runs a downloaded checkpoint, a laptop with credentials in the environment, a GPU node with network access.
The mitigation is a format that stores only tensors, as safetensors does, and metadata, with no executable payload. Safetensors exists for this reason, and it is the format to prefer where available.
The gap is that many popular checkpoints are distributed in older formats, and a conversion to safetensors is itself a step performed by a third party whose process you are trusting.
Quantisation is a modification
A converted checkpoint is a different artefact produced by someone other than the original publisher.
The transformation is legitimate and it changes the bytes. Which means a hash of the converted file proves nothing about the original, and a signature on the original does not cover the conversion.
Three risks follow.
The conversion could introduce a defect, intentionally or otherwise. A quantisation that subtly biases a weight matrix produces a model that behaves differently and reports nothing.
The conversion could be mislabelled. A file claiming a specific quantisation scheme but produced with another produces different quality, and the difference is invisible without testing.
And the converter itself is software that runs on your machine against a file you downloaded.
Provenance and what a hash proves
A hash proves that the file is the one whose hash you were given. It does not prove that the file is safe, and it does not prove anything about how it was produced.
A signature adds the identity of the signer, which is stronger and depends entirely on whether the signer is who you think.
The practical hierarchy is: prefer the original publisher, verify against their published hash or signature, and treat any intermediate party as a separate trust decision. A well-known hub hosting an upload is not verification, because the hub accepts what it is given.
Data poisoning and hidden behaviour
A model can be trained to behave normally on most inputs and specifically on a trigger.
The mechanism is well understood in classifier research, where a backdoor can be implanted by poisoning a small fraction of training data. For a language model the equivalent is a trigger phrase that causes a specific response, and it is harder to detect because the behaviour space is larger.
Detection is expensive. It requires probing with many potential triggers, examining whether the model has an unusual response to rare tokens, and comparing against a reference. A single organisation running a checkpoint has no baseline.
That makes provenance more important than testing. A model from a publisher with a reputation at stake is a different risk from an anonymous upload, and the difference cannot be established by inspection.
The loading environment
The control that works regardless of what the model does is the environment it runs in.
Four properties reduce the blast radius. No network access during load, so an attempted exfiltration fails. A scoped filesystem, so a malicious loader cannot read credentials. A non-privileged user, so the process cannot install persistence. And resource limits, so a model that tries to consume everything is killed.
Each is straightforward and each is commonly absent, because the default way to run a downloaded model is to run it in a notebook as the user.
A checklist that fits on a page
Where did the file come from, and is that the publisher's own repository. Was a hash or signature verified against the publisher's published value. What format is it, and does that format permit executable content. Was the file converted by a third party, and is that party trusted. What code runs at load, and can it be reviewed. What environment does the load happen in, and what can it reach.
Five minutes of checks, applied to what is currently done in one click by most teams. The reason to do them is not that most models are malicious. It is that a single compromised checkpoint has the permissions of the person who loaded it, and that person usually has more access than the task required.



