wifi-densepose/docs/huggingface
lockewerks 67d186549a docs(huggingface): document safetensors header padding bug + workaround
The model.safetensors file currently published at
huggingface.co/ruvnet/wifi-densepose-pretrained has a malformed header:
the 8-byte u64 declares 1464 header bytes, the JSON document ends at
byte 1461, and the last 3 bytes of the header zone are literal 0x00
padding instead of the spec-required 0x20 spaces. Strict safetensors
readers — Rust safetensors crate, Candle, safetensors.torch.load_file —
reject with 'SafetensorError: trailing characters at line 1 column 1462'.

This commit:
- adds docs/huggingface/SAFETENSORS-HEADER-BUG.md with byte-level
  evidence, spec citation, source-of-bug location (the SafeTensorsWriter
  in vendor/ruvector/.../export.js — separate repo at ruvnet/ruvector),
  list of three trainer scripts that go through this path
  (train-wiflow.js, train-ruvllm.js, train-camera-free.js), table of
  affected vs lenient consumers, 10-line strict-reader repro that
  reproduces the exact error class against a synthetic file, proposed
  upstream fix (0x20 padding or no padding), and a follow-ups checklist
  including the need to re-train/re-export and re-upload the HF artifact
- flags the bundle as needing republish under [Unreleased] in CHANGELOG.md
- updates the HF model section of docs/user-guide.md so the load example
  now patches the header with scripts/fix-safetensors-header.py before
  calling safetensors.torch.load_file (which would otherwise crash on
  the current bundle), and flips the Python/PyTorch row of the
  consumer-status table from 'Works' to 'Broken header — strict readers
  reject; patch with scripts/fix-safetensors-header.py'
2026-05-25 17:03:42 -06:00
..
MODEL_CARD.md fix(train): wire wifi-densepose-signal into the pipeline; correct MODEL_CARD env-sensor claim (#536) 2026-05-11 23:40:55 -04:00
SAFETENSORS-HEADER-BUG.md docs(huggingface): document safetensors header padding bug + workaround 2026-05-25 17:03:42 -06:00