PyTorch Archive built-in source_vocab.pt load PoC
Benign PoC for a valid PyTorch Archive (.mar) whose built-in text_classifier workflow reaches a ZIP-based source_vocab.pt sidecar during model initialization.
Files
text-classifier-crafted-zip.mar- valid minimized.mar(2073bytes) with a craftedsource_vocab.ptsidecarbuild-meta.json- measurement summary and artifact hashreplay_text_handler_source_vocab_load_ace.py- replays the documented TorchServe management API load path
What it demonstrates
When TorchServe 0.12.0 registers the archive via POST /models?initial_workers=1&synchronous=true, the built-in text_classifier handler reaches source_vocab.pt during initialization and the harmless marker is written.
Quick repro
Install Docker, then run:
python replay_text_handler_source_vocab_load_ace.py
The script starts pytorch/torchserve:0.12.0-cpu, registers the model with one worker, and prints JSON showing whether the marker fired.
This PoC is for defensive validation and bug-bounty triage only.