Skip to content

Releases: huggingface/safetensors

v0.6.2

08 Aug 13:10
aa6c43d
Compare
Choose a tag to compare

What's Changed

  • Fixing clippy in 1.89 by @Narsil in #644
  • Fixing the version check for uint support in torch. by @Narsil in #643

Full Changelog: v0.6.1...v0.6.2

v0.6.1

06 Aug 09:36
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1

v0.6.1-rc0

06 Aug 09:14
Compare
Choose a tag to compare
v0.6.1-rc0 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.6.0...v0.6.1-rc0

v0.6.0

23 Jun 07:47
f79f19d
Compare
Choose a tag to compare

Biggest changes

  • Added support for FP4/FP6 https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
    Support is still nascent in most frameworks (will require torch 2.8 which isn't released yet, and that will only support fp4 with caveats), however being an openspec supported by hardware manufacturers (and therefore hardware support most likely), it fits the bill of implementing it in safetensors (rather than all custom quantized formats existing in the wild in various frameworks.

    What FP4/FP6 mean, is that now a element of a tensor may have a non byte-aligned size/access. If you store a single fp4, then there is 4 bit on that byte that is outside of the spec. For now, safetensors library will simply raise MisalignedByte exception whenever an operation leads to unused/unaligned bits within a byte. Since most tensors are larger power of 2s, this shouldn't come up too often in practice. Raising an exception now means we have freedom later to actually implement a behavior which could align with tensor libraries.

    In that regard Dtype.size() is now deprecated, as it returns the size of the dtype in bytes, and we now favor bitsize() and it's up to users for now to handle something like len * bitsize() / 8 (and verifying the division is acceptable)

    On that note, and for Pytorch users specifically, torch doesn't actually implement fp4, it has a dtype called float4_e2m1fn_x2 which actually represents 2 fp4. This is why torch shouldn't have any alignement problems for now (but cannot implement fp6). But that also means that the shape of a [2, 2] tensor for floa4, contains actually 8 values. safetensors will actuallly silently cast a tensor of shape, [x, y, ...z] into [x, y, ..., z/2], using the last dimension to "swallow" , the x2 contained within the types. Again, there is no definite behavior just yet, so this might be subject to change.

What's Changed

New Contributors

Full Changelog: v0.5.3...v0.6.0

v0.6.0-rc1

16 Jun 13:27
cbcbe14
Compare
Choose a tag to compare
v0.6.0-rc1 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.5.3...v0.6.0-rc1

v0.6.0-rc0

16 Jun 06:35
69727eb
Compare
Choose a tag to compare
v0.6.0-rc0 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.5.3...v0.6.0-rc0

v0.5.3

26 Feb 09:11
066773f
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.2...v0.5.3

v0.5.2

08 Jan 17:39
f05a1ec
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.1...v0.5.2

v0.5.1

07 Jan 10:08
b139f7f
Compare
Choose a tag to compare

Fixed the stubs for type tools.

What's Changed

Full Changelog: v0.5.0...v0.5.1

v0.5.0

02 Jan 16:35
69ad4f7
Compare
Choose a tag to compare

Major changes.

  • Using abi3, python 3.8

What's Changed

New Contributors

Full Changelog: v0.4.5...v0.5.0