See whether local safetensors match the file published for that model.
A model directory can claim to be a public checkpoint and ship different tensors. The readme says one thing. The file is another. This comparison checks the local safetensors against the safetensors published for that model, so “this is the public model” becomes a statement you can test.
What is compared
Only safetensors are fetched and compared. Other weight containers are left alone, because those formats can carry executable payloads. If the publisher does not offer safetensors, this comparison has nothing honest to download. Say that. Do not “make it work” by fetching a pickle under another name.
If the environment cannot reach the publisher, skip the comparison and use a baseline your team copied in through a path you control. A failed download is not a match, and it is not a mismatch. It is an absence. Record it as an absence so the review does not later claim the files were verified.
What a mismatch means
A mismatch means the local tensor is not the published one. It is evidence for a review. Someone changed the file, you have the wrong revision, or you are not looking at the model the name implies. It is not a statement about how the model behaves when it answers a prompt, and it is not a conviction that the change is an attack. It is enough to stop a claim of “we are running the public checkpoint.”
A match means the safetensors that were compared agree. It does not cover files in the directory that were not safetensors. A directory can match on the public weights and still contain a separate executable file. Read the whole tree. The comparison only speaks for the tensors it hashed.
Pair a mismatch with runtime model checks when you need behavior. Do not treat either result as a certificate that the model is clean, and do not drop the mismatch because a short prompt “looked fine.”
