Sample .safetensors (SafeTensors) Test Files & Edge Cases
Deterministic SafeTensors Zero-Copy Model Weights fixtures engineered for automated unit tests, parser fuzzing, and upload validation pipelines. Pull directly in GitHub Actions with immutable SHA-256 verification.
minimal-bf16.safetensors
Real safetensors.torch output with __metadata__ and 3 tensors across BF16, F16, and F32 dtypes.
curl -fsSL https://fileformat.co/fixtures/v1/safetensors/minimal-bf16.safetensors -o minimal-bf16.safetensors \
&& echo "0d9894b505b77ec0d719fa112eead1695c8a2be9e1820c81267dfe1a64a2214b minimal-bf16.safetensors" | shasum -a 256 -cweights-bf16.safetensors
Multi-layer transformer weight shard written by safetensors.torch with exact contiguous data_offsets.
curl -fsSL https://fileformat.co/fixtures/v1/safetensors/weights-bf16.safetensors -o weights-bf16.safetensors \
&& echo "7594cbd039f2978e74012d1e761368a7d18f2f6efe6038e11a869f6d1c5a6b7f weights-bf16.safetensors" | shasum -a 256 -cunaligned-truncated.safetensors
Negative fixture with non-zero starting data_offsets [3, 8195] and truncated 24-byte body — safetensors must raise.
curl -fsSL https://fileformat.co/fixtures/v1/safetensors/unaligned-truncated.safetensors -o unaligned-truncated.safetensors \
&& echo "70d504e4e3dc7cc38bf0d72fe83b78badaf96f16be32402100c1450a9bb2e004 unaligned-truncated.safetensors" | shasum -a 256 -cIn-Browser Edge-Case & Malformed Fixture Mutator
Need negative test fixtures for parser fuzzing or upload gateway validation? Mutate minimal-bf16.safetensors directly in your browser without hosting unsafe payloads on public URLs.
Tests graceful EOF / footer corruption handling without process panic or OOM.