safetensors breaking changes
safetensors 0.8.0 (June 9, 2026) is its newest release with breaking changes, 12 of them. The first: safetensors 0.8.0 drops support for Python 3.9 and requires Python 3.10 or later. Every breaking API change we have recorded in safetensors on PyPI: 15 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 0.8.0, released June 9, 2026. Source repository
Its 0.8.0 release requires Python 3.10 or later. Python end of life dates.
safetensors 0.8.0 breaking changes
- Removed
The minimum supported Python version is now 3.10; users on Python 3.9 must upgrade. github.com - Behavior changed
serialize
Writes release the Python GIL, enabling multithreaded saves; code relying on the GIL being held during writes may behave differently. github.com - Behavior changed
serialize_file
Writes release the Python GIL, enabling multithreaded saves; code relying on the GIL being held during writes may behave differently. github.com - Signature changed
safetensors.flax.load_file
Was def load_file(filename: Union[str, os.PathLike]) -> Dict[str, Array]; now def load_file(filename: Union[str, os.PathLike], *, backend: str = 'mmap') -> Dict[str, Array]. pypi.org - Signature changed
safetensors.mlx.load_file
Was def load_file(filename: Union[str, os.PathLike]) -> Dict[str, mx.array]; now def load_file(filename: Union[str, os.PathLike], *, backend: str = 'mmap') -> Dict[str, mx.array]. pypi.org - Signature changed
safetensors.numpy.load_file
Was def load_file(filename: Union[str, os.PathLike]) -> Dict[str, np.ndarray]; now def load_file(filename: Union[str, os.PathLike], *, backend: str = 'mmap') -> Dict[str, np.ndarray]. pypi.org - Signature changed
safetensors.paddle.load_file
Was def load_file(filename: Union[str, os.PathLike], device='cpu') -> Dict[str, paddle.Tensor]; now def load_file(filename: Union[str, os.PathLike], device='cpu', *, backend: str = 'mmap') -> Dict[str, paddle.Tensor]. pypi.org - Signature changed
safetensors.tensorflow.load_file
Was def load_file(filename: Union[str, os.PathLike]) -> Dict[str, tf.Tensor]; now def load_file(filename: Union[str, os.PathLike], *, backend: str = 'mmap') -> Dict[str, tf.Tensor]. pypi.org - Signature changed
safetensors.torch.load_file
Was def load_file(filename: Union[str, os.PathLike], device: Union[str, int] = 'cpu') -> Dict[str, torch.Tensor]; now def load_file(filename: Union[str, os.PathLike], device: Union[str, int] = 'cpu', *, backend: str = 'mmap') -> Dict[str... pypi.org - Signature changed
safetensors.torch.load_model
Was def load_model(model: torch.nn.Module, filename: Union[str, os.PathLike], strict: bool = True, device: Union[str, int] = 'cpu') -> Tuple[List[str], List[str]]; now def load_model(model: torch.nn.Module, filename: Union[str... pypi.org - Signature changed
serialize
The low-level serialize function now expects tensor metadata via the TensorSpec class exported from safetensors; code calling it directly with plain dicts must be updated. The high-level wrappers are unchanged. github.com - Signature changed
serialize_file
The low-level serialize_file function now expects tensor metadata via the TensorSpec class exported from safetensors; code calling it directly with plain dicts must be updated. The high-level wrappers are unchanged. github.com
safetensors 0.6.0 breaking changes
- Behavior changed
Tensors of shape [x, y, ..., z] with the torch float4_e2m1fn_x2 dtype are cast to [x, y, ..., z/2], which may change in future. github.com - Behavior changed
Operations that leave unused or unaligned bits within a byte now raise a MisalignedByte exception, which affects new FP4/FP6 dtypes. github.com
safetensors 0.5.1 breaking changes
- Behavior changed
Memory-mapped loading now maps the file as a private copy. Code that relies on changes written through the mapping reaching the file on disk may behave differently. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.