How to verify model integrity after downloading
A model downloaded via Ollama or manually placed in the model store
What this does
Computes the digest of a stored model and compares it against the reference value from the upstream manifest. A mismatch signals a corrupted or tampered blob, prompting a safe fall-back re-download before using the model in production inference.
Steps
Retrieve the stored model digest. Reads the manifest digest that Ollama recorded during the pull operation.
ollama show llama3.2 | grep -i digestExpected output: A line beginning with
digestfollowed by a colon and a long hexadecimal string.Cross-check the per-blob shasum. Computes SHA-256 for each binary blob on disk and matches it against the manifest map.
find ~/.ollama/models/blobs -type f -exec sha256sum {} \;Expected output: A list of hash-value paths, each matching an entry in the manifest file.
Re-pull only the mismatched blob if needed. Ollama can selectively re-download a single corrupted file without restoring the entire model.
ollama pull llama3.2Expected output: When the pull completes and all checksums now match, Ollama prints the success line and exits.
- Record the local run evidence. Save the exact command, runtime or package version, model name if applicable, and observed output so the result can be reproduced later.
Verification
ollama show llama3.2 2>&1 | grep digest
# Expected: a single digest line with a stable hex string; re-running find + sha256sum confirms the same hash for each blob
Common failures
digest mismatch- Blob file is corrupted or incomplete; retryollama pull modelnameto re-fetch all layers.blob not found- The blob file is missing from the store, often due to manual deletion; a full re-pull restores it.sha256sum: command not found- Utility not installed on the host; install with the package manager and re-run.manifest corrupted- The manifest JSON cannot be parsed; a full re-pull overwrites the broken manifest with a clean copy.disk write error during validation- Filesystem mount is full or read-only; free space or remount before proceeding.