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

AI and models

How PexLens treats model files as supply-chain artifacts, and what it will not certify.

A model file is a supply-chain artifact with a confusing reputation. People treat it as data, then load it with a library that will execute code if the file asks it to. A repository can hide a payload in an unsafe serialization format, ship a tampered tensor, or offer a weight file that does not match the one published for that model. The directory still looks like a normal checkpoint. The loader is the one that finds out.

PexLens inspects those files the same way it inspects a package: look first, and do not execute what you do not trust. The result is evidence about the file. It is not a claim that the model’s answers are correct, unbiased, or safe to deploy. PexLens does not host inference, deploy a model, or keep a catalog of chat tools.

What is covered

  • Model files explains which formats PexLens will open, and which it refuses to open because opening them is the attack.
  • Deeper model checks look at the numbers inside a file, and can compare them with a copy your team already trusts.
  • Published model comparison checks local safetensors against the safetensors published for that model.
  • Runtime model checks run a small set of behavior probes. They always state that the model is not certified.

You can stop after the file inspection. Deeper checks and runtime probes are for the case where the file is not an obvious payload and you still need to know whether the tensors or the behavior look wrong. They are not a ladder you must climb before a pickle is considered dangerous. A file that executes on load is already the finding.

Package reviews are separate

A written review of a package change, or of a signature hit, is documented under Written reviews. That review explains a package verdict. It is not an evaluation of a model, and a model check is not a written review of a JavaScript diff. Keep the two conversations apart so a clean package verdict is not mistaken for a clean checkpoint, or the reverse.

What to tell a team that wants to “just load it”

Do not load an untrusted pickle, or a full model loader, to see if the file is safe. Loading it is how the payload runs. PexLens skips those paths on purpose. A file already flagged as a code-execution payload is not opened.

The safe sequence is the uninteresting one. Inspect the file. Read whether it is an unsafe serialization, a numeric outlier, or a mismatch with the published weights. Only then decide whether a loader your team trusts is allowed to open it, in an environment that can survive being wrong. “We loaded it and nothing happened” is not a control. It is the test the payload may have chosen not to trip.