pub fn serialize_state_dict_to_bytes(
state_dict: &HashMap<String, Tensor>,
) -> Result<Vec<u8>>Expand description
Serialize a state dict (HashMap<String, Tensor>) to safetensors bytes.
This replaces direct Tensor::save_multi() calls, allowing writes through FsOps.