Operate local AI responsibly

Verify model files and code

Treat model repositories, conversion scripts, templates, and custom runtime code as a software supply chain.

Model files come from a supply chain.

Prefer original publishers or established maintainers. Check the repository identity, source model, revision, license, conversion notes, and file hashes when available.

Safetensors avoids the arbitrary-code behavior of Python pickle files. GGUF stores tensors and metadata for inference. Safe data formats reduce one risk, but a model repository may also ask you to run custom code or installation scripts.

Be careful with options such as trust_remote_code. They mean you are allowing code supplied by the repository to execute. Inspect and pin that code before using it with sensitive data.

A chat template can also change behavior. A conversion that uses the wrong tokenizer or template may produce poor results even when the weight file itself is intact.

Record the artifact hash and runtime version for important deployments. If a repository changes later, you can still identify what you tested.

Lesson completed

Take this course offline

Get every free book, course edition, and software download.

Get the download library →