Tensorizer metadata amplification PoC
This repository contains a benign security research proof of concept for a valid .tensors artifact that forces Tensorizer to materialize a very large metadata index during TensorDeserializer(..., lazy_load=True) initialization.
Files
tensorizer_meta_1000000.tensors- replay artifact with1000000metadata entriesbuild-meta.json- file-size and measurement summaryrequirements.txt- minimal Python dependencies for local replayreproduce_tensorizer_metadata_amp.py- minimal replay helperrepro.sh- one-command local reproductionmeasure_tensorizer_metadata_amp.py- full builder and measurement harness
What it demonstrates
The artifact is only about 45 MB, but Tensorizer eagerly reads and indexes the full metadata table before any actual tensor payload is lazily loaded.
In the saved local measurement:
- file size is about
45.0 MB TensorDeserializer(..., lazy_load=True)adds about760 MBRSS- initialization takes about
7.2 s
Quick repro
Install a Python environment with:
tensorizer==2.12.1psutiltorch
Then run:
bash repro.sh
Expected output shape:
{
"ok": true,
"len": 1000000,
"elapsed_ms": 7189.915,
"rss_delta": 760512512
}
This PoC is intended for defensive validation and bug bounty triage only.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support