Skip to content

v0.2.0 - Parallel Multi-Shard Manifest Verification

Choose a tag to compare

@Abhrankan-Chakrabarti Abhrankan-Chakrabarti released this 23 Nov 15:44
· 12 commits to main since this release

πŸš€ stverify v0.2.0 β€” Parallel Multi-Shard Manifest Verification

stverify v0.2.0 introduces parallel multi-shard manifest signing and verification (sign-dir / verify-dir), engineered specifically for hyperscale AI deployments (such as multi-thousand GPU NVIDIA B300 clusters) running 70B–405B+ parameter LLMs across dozens of .safetensors shards.


🌟 What's New in v0.2.0

1. ⚑ Parallel Multi-Shard Hashing (rayon)

  • Shards are discovered, sorted deterministically by filename, and hashed concurrently across all available CPU cores.
  • Slashes verification latency for massive multi-shard weights (e.g., Llama-3 70B, DeepSeek 671B) before weights are mapped to GPU memory.

2. πŸ“œ Canonical Manifest Signing (sign-dir)

  • Builds a canonical, newline-delimited manifest (<sha256_hex> <filename>) across every .safetensors file in the model directory.
  • Cryptographically signs the manifest with Ed25519, generating stverify.manifest and stverify.sig.

3. πŸ›‘οΈ Complete Directory Integrity Guarantees (verify-dir)

  • Authenticity: Validates the Ed25519 signature of the manifest itself against the public key.
  • Tampering Detection: Catches any bit-level weight corruption across any shard in parallel.
  • Injection & Deletion Protection: Instantly detects missing shards or unmanifested rogue/backdoored shards injected into the directory.

4. 🐳 Cloud-Native & Kubernetes Ready

  • Added multi-stage Dockerfile (FROM scratch) for ultra-lightweight deployment (~5MB) as a Kubernetes init-container for Confidential GPU pods.
  • Added GitHub Actions automated multi-platform release matrix (Linux musl, macOS, Windows).

πŸ“¦ CLI Commands

# Multi-shard directory operations (Recommended for production)
stverify sign-dir ./models/llama-3-70b-instruct/ signing.priv
stverify verify-dir ./models/llama-3-70b-instruct/ signing.pub

# Single-shard operations
stverify sign model-00001-of-00004.safetensors signing.priv model-00001.sig
stverify verify model-00001-of-00004.safetensors signing.pub model-00001.sig

🎯 Process Exit Codes

Exit Code Meaning
0 Success: Signature and framing verified; all shards intact.
1 Error: Usage error, I/O failure, or malformed header.
2 Failure: Signature mismatch, tampered weights, missing shard, or rogue shard injected.