Installation¶
Install Modeldiffr from PyPI or from source.
Requirements¶
- Python 3.10, 3.11, or 3.12
- A GPU for anything larger than a small model. Both models are held in memory at once.
Install from PyPI¶
The
hf extra installs torch>=2.1, transformers>=4.40, accelerate>=0.30 and huggingface_hub. Use this to run audits.
See Backends.
sign adds cryptography and sigstore; anchor adds the OpenTimestamps client and web3. See Sign and verify.
No GPU and no PyTorch. Enough to run
modeldiffr verify report.json with the full schema check.
Warning
Running modeldiffr audit without the hf extra exits with code 2 and prints:
Install from source¶
The dev extra adds pytest, ruff, build, twine, jsonschema, numpy, safetensors and gguf.
Verify¶
Expected output:
You can also run the package as a module:
Device support¶
--device auto picks the first available option in this order:
cudamps(Apple Silicon)cpu
Pass an explicit value such as cuda:0 to override.