---
title: "safetensors 0.8.0 Breaking Changes on PyPI | Since.dev"
description: "What each safetensors release removed, renamed or changed: 15 breaking changes in 3 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/safetensors
last_updated: 2026-12-04
---

# 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

Latest version `0.8.0`, released June 9, 2026. [Source repository](https://github.com/huggingface/safetensors)

Its 0.8.0 release requires [Python 3.10](https://since.dev/calendar/python/3.10.md) or later. [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.5.1](#v-0-5-1) to [0.8.0](#v-0-8-0): 14 breaking changes in 2 versions.

## safetensors 0.8.0 breaking changes

safetensors 0.8.0, released June 9, 2026: 12 breaking changes.

- **Removed**  

The minimum supported Python version is now 3.10; users on Python 3.9 must upgrade. [github.com](https://github.com/safetensors/safetensors/releases/tag/v0.8.0)
- **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](https://github.com/safetensors/safetensors/releases/tag/v0.8.0)
- **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](https://github.com/safetensors/safetensors/releases/tag/v0.8.0)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://pypi.org/project/safetensors/0.8.0/)
- **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](https://github.com/safetensors/safetensors/releases/tag/v0.8.0)
- **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](https://github.com/safetensors/safetensors/releases/tag/v0.8.0)

## safetensors 0.6.0 breaking changes

safetensors 0.6.0, released August 6, 2025: 2 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](https://github.com/safetensors/safetensors/releases/tag/v0.6.0)
- **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](https://github.com/safetensors/safetensors/releases/tag/v0.6.0)

## safetensors 0.5.1 breaking changes

safetensors 0.5.1, released January 7, 2025: 1 breaking change.

- **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](https://github.com/safetensors/safetensors/releases/tag/v0.5.1)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
