Commit Graph

1 Commits

Author SHA1 Message Date
lockewerks 44c06b11ec chore(scripts): add hf pretrained model verify helper
Adds scripts/verify-hf-model.py, a Python 3 helper that sanity-checks the
downloaded `ruvnet/wifi-densepose-pretrained` bundle end-to-end:

  - dumps the safetensors tensor inventory (names, shapes, dtypes)
  - parses model.rvf.jsonl line-by-line and lists distinct top-level keys
  - dumps presence-head.json (depth-bounded), full config.json, and the
    final training metrics from training-metrics.json
  - runs a synthetic batch through encoder.w1 (the first linear layer)
    when torch is importable and asserts the output is finite
  - exits 0 on success, non-zero with a clear error otherwise

Adds a 5-line pointer to the helper in docs/user-guide.md under the
existing pretrained-model section, and ignores the downloaded weight
directory plus session scratch files via .gitignore.

Findings from running once: the bundle ships 17 F32 tensors covering a
csi-encoder-8-64-128 (input 8 -> hidden 64 -> embedding 128) with batch
norm, a 128-d presence head, and a 2k-param LoRA adapter. The published
model.safetensors header has three trailing NUL bytes that the strict
Rust safetensors loader rejects, so the script falls back to a small
pure-Python reader to recover the inventory.
2026-05-25 16:50:07 -06:00