safetensors 0.6.1rc0__tar.gz → 0.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of safetensors might be problematic. Click here for more details.

Files changed (57) hide show
  1. {safetensors-0.6.1rc0 → safetensors-0.6.2}/PKG-INFO +1 -1
  2. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/Cargo.lock +7 -7
  3. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/Cargo.toml +1 -1
  4. {safetensors-0.6.1rc0 → safetensors-0.6.2/bindings/python}/py_src/safetensors/torch.py +2 -2
  5. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/src/lib.rs +1 -1
  6. {safetensors-0.6.1rc0/bindings/python → safetensors-0.6.2}/py_src/safetensors/torch.py +2 -2
  7. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/Cargo.toml +1 -1
  8. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/src/tensor.rs +6 -6
  9. {safetensors-0.6.1rc0 → safetensors-0.6.2}/LICENSE +0 -0
  10. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/.gitignore +0 -0
  11. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/LICENSE +0 -0
  12. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/MANIFEST.in +0 -0
  13. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/Makefile +0 -0
  14. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/README.md +0 -0
  15. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/benches/test_flax.py +0 -0
  16. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/benches/test_mlx.py +0 -0
  17. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/benches/test_paddle.py +0 -0
  18. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/benches/test_pt.py +0 -0
  19. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/benches/test_tf.py +0 -0
  20. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/convert.py +0 -0
  21. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/convert_all.py +0 -0
  22. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/fuzz.py +0 -0
  23. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/__init__.py +0 -0
  24. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/__init__.pyi +0 -0
  25. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/flax.py +0 -0
  26. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/mlx.py +0 -0
  27. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/numpy.py +0 -0
  28. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/paddle.py +0 -0
  29. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/py.typed +0 -0
  30. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/py_src/safetensors/tensorflow.py +0 -0
  31. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/setup.cfg +0 -0
  32. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/src/view.rs +0 -0
  33. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/stub.py +0 -0
  34. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/data/__init__.py +0 -0
  35. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_flax_comparison.py +0 -0
  36. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_handle.py +0 -0
  37. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_mlx_comparison.py +0 -0
  38. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_paddle_comparison.py +0 -0
  39. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_pt_comparison.py +0 -0
  40. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_pt_model.py +0 -0
  41. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_simple.py +0 -0
  42. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/tests/test_tf_comparison.py +0 -0
  43. {safetensors-0.6.1rc0 → safetensors-0.6.2}/bindings/python/uv.lock +0 -0
  44. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/__init__.py +0 -0
  45. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/__init__.pyi +0 -0
  46. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/flax.py +0 -0
  47. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/mlx.py +0 -0
  48. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/numpy.py +0 -0
  49. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/paddle.py +0 -0
  50. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/py.typed +0 -0
  51. {safetensors-0.6.1rc0 → safetensors-0.6.2}/py_src/safetensors/tensorflow.py +0 -0
  52. {safetensors-0.6.1rc0 → safetensors-0.6.2}/pyproject.toml +0 -0
  53. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/LICENSE +0 -0
  54. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/README.md +0 -0
  55. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/benches/benchmark.rs +0 -0
  56. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/src/lib.rs +0 -0
  57. {safetensors-0.6.1rc0 → safetensors-0.6.2}/safetensors/src/slice.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: safetensors
3
- Version: 0.6.1rc0
3
+ Version: 0.6.2
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Intended Audience :: Education
@@ -1,6 +1,6 @@
1
1
  # This file is automatically @generated by Cargo.
2
2
  # It is not intended for manual editing.
3
- version = 4
3
+ version = 3
4
4
 
5
5
  [[package]]
6
6
  name = "autocfg"
@@ -40,9 +40,9 @@ checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
40
40
 
41
41
  [[package]]
42
42
  name = "memmap2"
43
- version = "0.9.7"
43
+ version = "0.9.5"
44
44
  source = "registry+https://github.com/rust-lang/crates.io-index"
45
- checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28"
45
+ checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f"
46
46
  dependencies = [
47
47
  "libc",
48
48
  ]
@@ -156,7 +156,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
156
156
 
157
157
  [[package]]
158
158
  name = "safetensors"
159
- version = "0.6.1-rc.0"
159
+ version = "0.6.2"
160
160
  dependencies = [
161
161
  "serde",
162
162
  "serde_json",
@@ -164,7 +164,7 @@ dependencies = [
164
164
 
165
165
  [[package]]
166
166
  name = "safetensors-python"
167
- version = "0.6.1-rc.0"
167
+ version = "0.6.2"
168
168
  dependencies = [
169
169
  "memmap2",
170
170
  "pyo3",
@@ -194,9 +194,9 @@ dependencies = [
194
194
 
195
195
  [[package]]
196
196
  name = "serde_json"
197
- version = "1.0.142"
197
+ version = "1.0.140"
198
198
  source = "registry+https://github.com/rust-lang/crates.io-index"
199
- checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
199
+ checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
200
200
  dependencies = [
201
201
  "itoa",
202
202
  "memchr",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "safetensors-python"
3
- version = "0.6.1-rc.0"
3
+ version = "0.6.2"
4
4
  edition = "2021"
5
5
  rust-version = "1.74"
6
6
  readme = "README.md"
@@ -433,7 +433,7 @@ _SIZE = {
433
433
  _float8_e8m0: 1,
434
434
  _float4_e2m1_x2: 1,
435
435
  }
436
- if Version(torch.__version__) > Version("2.0.0"):
436
+ if Version(torch.__version__) >= Version("2.3.0"):
437
437
  _SIZE.update(
438
438
  {
439
439
  torch.uint64: 8,
@@ -456,7 +456,7 @@ _TYPES = {
456
456
  "F8_E4M3": _float8_e4m3fn,
457
457
  "F8_E5M2": _float8_e5m2,
458
458
  }
459
- if Version(torch.__version__) > Version("2.0.0"):
459
+ if Version(torch.__version__) >= Version("2.3.0"):
460
460
  _TYPES.update(
461
461
  {
462
462
  "U64": torch.uint64,
@@ -33,7 +33,7 @@ struct PyView<'a> {
33
33
  }
34
34
 
35
35
  impl View for &PyView<'_> {
36
- fn data(&self) -> std::borrow::Cow<[u8]> {
36
+ fn data(&self) -> std::borrow::Cow<'_, [u8]> {
37
37
  Cow::Borrowed(self.data.as_bytes())
38
38
  }
39
39
  fn shape(&self) -> &[usize] {
@@ -433,7 +433,7 @@ _SIZE = {
433
433
  _float8_e8m0: 1,
434
434
  _float4_e2m1_x2: 1,
435
435
  }
436
- if Version(torch.__version__) > Version("2.0.0"):
436
+ if Version(torch.__version__) >= Version("2.3.0"):
437
437
  _SIZE.update(
438
438
  {
439
439
  torch.uint64: 8,
@@ -456,7 +456,7 @@ _TYPES = {
456
456
  "F8_E4M3": _float8_e4m3fn,
457
457
  "F8_E5M2": _float8_e5m2,
458
458
  }
459
- if Version(torch.__version__) > Version("2.0.0"):
459
+ if Version(torch.__version__) >= Version("2.3.0"):
460
460
  _TYPES.update(
461
461
  {
462
462
  "U64": torch.uint64,
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "safetensors"
3
- version = "0.6.1-rc.0"
3
+ version = "0.6.2"
4
4
  edition = "2021"
5
5
  rust-version = "1.80"
6
6
  homepage = "https://github.com/huggingface/safetensors"
@@ -142,7 +142,7 @@ struct PreparedData {
142
142
  /// fn shape(&self) -> &[usize]{
143
143
  /// &self.shape
144
144
  /// }
145
- /// fn data(&self) -> Cow<[u8]>{
145
+ /// fn data(&self) -> Cow<'_, [u8]>{
146
146
  /// (&self.data).into()
147
147
  /// }
148
148
  /// fn data_len(&self) -> usize{
@@ -166,7 +166,7 @@ struct PreparedData {
166
166
  /// fn shape(&self) -> &[usize]{
167
167
  /// &self.shape
168
168
  /// }
169
- /// fn data(&self) -> Cow<[u8]>{
169
+ /// fn data(&self) -> Cow<'_, [u8]>{
170
170
  /// self.data.into()
171
171
  /// }
172
172
  /// fn data_len(&self) -> usize{
@@ -193,7 +193,7 @@ struct PreparedData {
193
193
  /// fn shape(&self) -> &[usize]{
194
194
  /// &self.shape
195
195
  /// }
196
- /// fn data(&self) -> Cow<[u8]>{
196
+ /// fn data(&self) -> Cow<'_, [u8]>{
197
197
  /// // This copies data from GPU to CPU.
198
198
  /// let data: Vec<u8> = self.data.to_vec();
199
199
  /// data.into()
@@ -211,7 +211,7 @@ pub trait View {
211
211
  /// The shape of the tensor
212
212
  fn shape(&self) -> &[usize];
213
213
  /// The data of the tensor
214
- fn data(&self) -> Cow<[u8]>;
214
+ fn data(&self) -> Cow<'_, [u8]>;
215
215
  /// The length of the data, in bytes.
216
216
  /// This is necessary as this might be faster to get than `data().len()`
217
217
  /// for instance for tensors residing in GPU.
@@ -678,7 +678,7 @@ impl View for &TensorView<'_> {
678
678
  &self.shape
679
679
  }
680
680
 
681
- fn data(&self) -> Cow<[u8]> {
681
+ fn data(&self) -> Cow<'_, [u8]> {
682
682
  self.data.into()
683
683
  }
684
684
 
@@ -696,7 +696,7 @@ impl View for TensorView<'_> {
696
696
  &self.shape
697
697
  }
698
698
 
699
- fn data(&self) -> Cow<[u8]> {
699
+ fn data(&self) -> Cow<'_, [u8]> {
700
700
  self.data.into()
701
701
  }
702
702
 
File without changes