torch.serialization
Functions
- save - Exports tensors or models to a file with automatic browser download.
- load - Load tensors from a URL, File, or Blob.
- load_safetensors - Load tensors from safetensors format with metadata.
- deserialize_from_zip - Load a PyTorch model from a ZIP archive (.pt, .pth file).
- serialize_to_zip - Serialize a tensor or state dict to PyTorch ZIP format (.pt/.pth files).
- serialize_to_safetensors - Serialize tensors to safetensors format.
- deserialize_from_safetensors - Deserialize safetensors format to tensors.
- is_safetensors - Check if data is in safetensors format.
Types
- SerializationFormat - Supported serialization formats.
- SaveOptions - Options for save().
- LoadOptions - Options for load().
- Saveable - Data that can be saved: a Tensor or a state dict (record of tensors)
- SerializeOptions - Options for serialize_to_safetensors.
- SaveFunc -
- LoadFunc -