YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
CAND-ST-DTYPE-HEADER-001 PoC
This package reproduces a header-only dtype reinterpretation in SafeTensors model loading.
Files
baseline.safetensors: baseline model weights.variant_dtype_i32_header_only.safetensors: same tensor body as baseline, one header byte changed fromF32toI32forleft.weight.reproduce.py: deterministic 3-run reproduction throughsafetensors.torch.load_model(..., strict=True).transformers_reproduce.py: deterministic downstream reproduction throughAutoModelForSequenceClassification.from_pretrained(local_dir), showing aBLOCKtoALLOWsafety-gate decision flip.
Run
python -m pip install safetensors torch numpy
python reproduce.py
Expected result:
body_sha256_equalistrue.header_len_equalistrue.load_model(strict=True)reports no missing or unexpected keys.- Baseline output is
[-6.25, 0.09375]. - Variant output is
[-6952058880.0, 1059585984.0].
Optional downstream impact check:
python -m pip install safetensors torch numpy transformers
python transformers_reproduce.py
Expected result:
- The generated baseline and variant model directories have equal SafeTensors body SHA256.
- The variant changes one header byte for
classifier.biasfromF32toI32. AutoModelForSequenceClassification.from_pretrained(local_dir)loads both models.- Baseline decision is
BLOCK. - Variant decision is
ALLOW.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support