Privacy & security
Before downloading a new model: inspect publisher, files and accompanying code
Track weight provenance, revision and fingerprints, separating storage-format safety from trust in code a loader may request.

A model release is more than a name
A repository can contain weights, tokenizer files, configuration and Python code. Identify required files, their publisher and whether loading them requires repository code. A familiar model name cannot authenticate every converted copy.
A third-party conversion or quantization may be useful, but retain its relationship to the original. Do not label it official without evidence. Save an immutable revision rather than only a moving branch name.
A fingerprint detects change, not benevolence
Calculate SHA256 after downloading and compare it with a trusted expected value when available. The example fingerprints synthetic bytes and detects a one-byte change. A hash supplied by an untrusted publisher does not make that publisher trustworthy.
Check completeness too. A partial file with the right name can fail or be mistaken for another model. Renaming a failed download to satisfy a loader is not validation.
Safe-download scenario: a fictional repository offers model.safetensors, tokenizer.json, config.json and optional loader code. Pin an immutable revision and document the publisher first. Hash each file and compare it with a trusted-channel digest when supplied. Do not run attached Python or enable trust_remote_code just because weights are present; code review and sandbox permissions are a separate decision from weight integrity.
| file | pre-use check | execution exposure | decision |
|---|---|---|---|
| model.safetensors | hash and source | weight data | also review loader |
| tokenizer.json | version and digest | configuration data | match revision |
| config.json | fields and revision | config data | check references |
| loader.py | review code/dependencies | executable code | never autorun |
import hashlib
original = b"synthetic-weights-demo-v1"
expected = hashlib.sha256(original).hexdigest()
print("same bytes:", hashlib.sha256(original).hexdigest() == expected)
changed = b"synthetic-weights-demo-v2"
print("changed bytes:", hashlib.sha256(changed).hexdigest() == expected)
# Matching a hash is not a publisher-trust or malware test.Identical bytes return True and changed bytes False. A fingerprint does not establish safe code or a trustworthy publisher.
Download example text ↓Understand Safetensors boundaries
Safetensors provides a weight format designed to avoid executing code when reading tensor data. That addresses one format behavior, not the security of an entire repository or the accuracy of generated answers.
A loader may separately request custom code. Inspect why it is needed and what runs before enabling trust in remote code. Permission to read model data is not automatic permission to execute every accompanying file.
Bound the first experiment
Use non-sensitive synthetic input and an environment without unnecessary private files. Inspect connections and logging according to your requirements. An initial weight download needs network access, not access to unrelated private directories.
Treat extensions as software dependencies with a publisher and version. Record configuration changes so an addition can be removed or a working state restored.
Keep transport, software and quality judgments separate
A file can match its hash, use a suitable format and still fail your task. Those are separate judgments. Evaluate language quality and usage conditions independently of transfer and storage checks.
No real weight file or new model code was audited here. The calculation is a bounded local example and the references document format and repository information. Apply the checklist to actual releases before approving their execution.
Make three judgments per file: publisher identity, transfer integrity, and execution exposure. A checksum published by an untrusted attacker is not proof of provenance. If you proceed to inference, begin with local synthetic input and monitor permissions, resources and unexpected network requests. The worksheet is a file-handling exercise, not an audit of an actual model.
Sources & further reading
Sources support concepts and features; proposed trials are educational examples.
Prepared with AI assistance. Educational examples are not product tests; actual measurements identify their method and scope. Editorial approach ↗

