File size: 718 Bytes
2187f97 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Tensorizer torch_compat weights_only default bypass
This package reproduces a Tensorizer `torch_compat` issue where PyTorch 2.6+
default safe loading blocks a malicious checkpoint, but the normal
`tensorizer_loading()` compatibility context executes the same checkpoint
without the caller passing `weights_only=False`.
Run from the repository root:
```bash
reproduce.py
```
Expected marker:
```text
MFV_TENSORIZER_WEIGHTS_ONLY_DEFAULT_BYPASS
```
The marker appears only in the explicit unsafe PyTorch baseline and the default
Tensorizer compatibility context. It does not appear for plain `torch.load()`,
plain `torch.load(..., weights_only=True)`, or
`tensorizer_loading()` with explicit `weights_only=True`.
|