Opens in a new tab
PexLens logo
PexLens logo
Pricing
Add your offcanvas content in here
Add your offcanvas content in here

Deeper model checks

Numeric checks on weights, and a comparison against a copy you already trust.

Deeper checks run when the first pass has not already condemned the file as an executable payload, and you still need to know whether the numbers inside it look wrong. They run on CPU. They look at tensors, not at how the model answers a prompt. A model can have ordinary weights and still be a bad model for your task. These checks will not tell you that. They will tell you whether the file looks damaged, extreme, or different from a copy you trust.

What the numbers mean

Non-finite values, extreme magnitudes, and tensors that are effectively dead are signs that the file is not a clean copy of a trained model, or that something rewrote it. Outliers concentrated on a small classifier head are a reason to look harder at that layer, not an automatic accusation of a backdoor. Report the layer and the kind of anomaly. Let someone who owns the model decide whether the anomaly is the training run they expect.

These checks do not certify the model. A quiet numeric pass means the tensors that were read did not trip these conditions. It does not mean the model is free of unwanted behavior. Pair it with runtime model checks only when you need behavior, and still keep the statement that the result is not a certificate.

A copy you trust

Compare the file with a directory your team already trusts. Overlapping small layers can be compared both by a hash of each tensor and by how similar the values are. Use this when you have a known-good snapshot, taken by you, and you want to see whether a new file diverged. A difference is evidence that the files are not the same. It is not, by itself, an explanation of which one is right. If your baseline was already tampered with, the comparison will bless the tamper. The baseline is only as good as the way you obtained it.

A published checkpoint

A separate comparison can check local safetensors against the safetensors published for that model. That is the only network step in this check, and it fetches safetensors only. It does not fetch pickle-based or other executable weight containers, because fetching them would repeat the problem you are trying to avoid. Turn the comparison off in a locked-down environment and compare against a file you copied in yourself. Details are on Published model comparison.