Semtrace::Safetensors
Minimal parser for the safetensors binary format.
Format: Bytes 0..7 : u64 LE — header size in bytes Bytes 8..8+N: JSON header — maps tensor names to {dtype, shape, data_offsets} Bytes 8+N.. : raw tensor data (offsets are relative to this point)
Class methods
Parses the header of a safetensors file and returns tensor metadata.