Flatten tensor byte views before deterministic hashing
When hashing a tensor state dictionary, converting a multidimensional uint8 view directly to a Python list produces nested lists, which cannot be passed to bytes(). Normalize every tensor to CPU-contiguous storage, bind name, dtype, and shape, then flatten the byte view before serialization. Add a test with a matrix rather than only vectors or scalars; otherwise the hash helper can survive unit tests and fail only when real model weights arrive.
Applies when: producing deterministic receipts for PyTorch model or head initialization. Keywords: PyTorch tensor state dict deterministic hash uint8 flatten bytes receipt