Skip to main content

save_weights

Function save_weights 

Source
pub fn save_weights(
    path: &Path,
    tensors: &HashMap<String, Tensor>,
) -> Result<(), ModelError>
Expand description

Saves a named set of tensors to a binary file (safetensors-like format).

Format: [8 bytes: header_len as u64 LE] [header JSON bytes] [raw f32 data].