safetensors 0.5.3
pip install safetensors
Released:
No project description provided
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License
- Author: Nicolas Patry
- Requires: Python >=3.7
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
- Typing
Project description
Installation
pip install safetensors
Usage
Numpy
from safetensors.numpy import save_file, load_file
import numpy as np
tensors = {
"a": np.zeros((2, 2)),
"b": np.zeros((2, 3), dtype=np.uint8)
}
save_file(tensors, "./model.safetensors")
# Now loading
loaded = load_file("./model.safetensors")
Torch
from safetensors.torch import save_file, load_file
import torch
tensors = {
"a": torch.zeros((2, 2)),
"b": torch.zeros((2, 3), dtype=torch.uint8)
}
save_file(tensors, "./model.safetensors")
# Now loading
loaded = load_file("./model.safetensors")
Developing
# inside ./safetensors/bindings/python
pip install .[dev]
Should be enough to install this library locally.
Testing
# inside ./safetensors/bindings/python
pip install .[dev]
pytest -sv tests/
Project details
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License
- Author: Nicolas Patry
- Requires: Python >=3.7
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
- Typing
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Uploaded
CPython 3.8+
Windows x86-64
Uploaded
CPython 3.8+
musllinux: musl 1.2+ x86-64
Uploaded
CPython 3.8+
musllinux: musl 1.2+ i686
Uploaded
CPython 3.8+
musllinux: musl 1.2+ ARMv7l
Uploaded
CPython 3.8+
musllinux: musl 1.2+ ARM64
Uploaded
CPython 3.8+
manylinux: glibc 2.17+ x86-64
Uploaded
CPython 3.8+
manylinux: glibc 2.17+ s390x
Uploaded
CPython 3.8+
manylinux: glibc 2.17+ ppc64le
Uploaded
CPython 3.8+
manylinux: glibc 2.17+ ARMv7l
Uploaded
CPython 3.8+
manylinux: glibc 2.17+ ARM64
Uploaded
CPython 3.8+
manylinux: glibc 2.5+ i686
Uploaded
CPython 3.8+
macOS 11.0+ ARM64
Uploaded
CPython 3.8+
macOS 10.12+ x86-64
File details
Details for the file safetensors-0.5.3.tar.gz
.
File metadata
- Download URL: safetensors-0.5.3.tar.gz
- Upload date:
- Size: 67.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6b0d6ecacec39a4fdd99cc19f4576f5219ce858e6fd8dbe7609df0b8dc56965 |
|
MD5 | 136d4961bc75cb4dbb19b1684baca3db |
|
BLAKE2b-256 | 717e2d5d6ee7b40c0682315367ec7475693d110f512922d582fef1bd4a63adc3 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 308.9 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 836cbbc320b47e80acd40e44c8682db0e8ad7123209f69b093def21ec7cafd11 |
|
MD5 | 0d7c94bec014353768fc1e4926043835 |
|
BLAKE2b-256 | 69e2b011c38e5394c4c18fb5500778a55ec43ad6106126e74723ffaee246f56e |
File details
Details for the file safetensors-0.5.3-cp38-abi3-win32.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-win32.whl
- Upload date:
- Size: 296.7 kB
- Tags: CPython 3.8+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfc0ec0846dcf6763b0ed3d1846ff36008c6e7290683b61616c4b040f6a54ace |
|
MD5 | 7479ac5a20cf35c497f8c7db159b03fd |
|
BLAKE2b-256 | 0a0c95aeb51d4246bd9a3242d3d8349c1112b4ee7611a4b40f0c5c93b05f001d |
File details
Details for the file safetensors-0.5.3-cp38-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 643.1 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f1521be045e56fc2b54c606d4455573e717b2d887c579ee1dbba5f868ece04 |
|
MD5 | 24f1ff1bde2b62f56db0490613627665 |
|
BLAKE2b-256 | 40ad2b113098e69c985a3d8fbda4b902778eae4a35b7d5188859b4a63d30c161 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-musllinux_1_2_i686.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 670.7 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32c3ef2d7af8b9f52ff685ed0bc43913cdcde135089ae322ee576de93eae5135 |
|
MD5 | 0d24a059d63a518743c6d9fc1b5da3e0 |
|
BLAKE2b-256 | 7dff41fcc4d3b7de837963622e8610d998710705bbde9a8a17221d85e5d0baad |
File details
Details for the file safetensors-0.5.3-cp38-abi3-musllinux_1_2_armv7l.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 734.0 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df26da01aaac504334644e1b7642fa000bfec820e7cef83aeac4e355e03195ff |
|
MD5 | f0e79c08dd260527f41c51236541a05f |
|
BLAKE2b-256 | 825ac116111d8291af6c8c8a8b40628fe833b9db97d8141c2a82359d14d9e078 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-musllinux_1_2_aarch64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 638.0 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799021e78287bac619c7b3f3606730a22da4cda27759ddf55d37c8db7511c74b |
|
MD5 | 83167bde62b2faa1d502a3da5c2f1840 |
|
BLAKE2b-256 | 5f188e108846b506487aa4629fe4116b27db65c3dde922de2c8e0cc1133f3f29 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 471.6 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cead1fa41fc54b1e61089fa57452e8834f798cb1dc7a09ba3524f1eb08e0317a |
|
MD5 | c039346025f1d4587ac732408cc839d5 |
|
BLAKE2b-256 | a6f8dae3421624fcc87a89d42e1898a798bc7ff72c61f38973a65d60df8f124c |
File details
Details for the file safetensors-0.5.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 537.7 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 391ac8cab7c829452175f871fcaf414aa1e292b5448bd02620f675a7f3e7abb9 |
|
MD5 | d29bc12c8590d271d6746959d105acd7 |
|
BLAKE2b-256 | 573dfe73a9d2ace487e7285f6e157afee2383bd1ddb911b7cb44a55cf812eae3 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 522.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bd84b12b1670a6f8e50f01e28156422a2bc07fb16fc4e98bded13039d688a0d |
|
MD5 | 4a9cfa9ab9e57a0d72e8b473e1ef8e3b |
|
BLAKE2b-256 | 58117456afb740bd45782d0f4c8e8e1bb9e572f1bf82899fb6ace58af47b4282 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 472.4 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a243be3590bc3301c821da7a18d87224ef35cbd3e5f5727e4e0728b8172411e |
|
MD5 | 98083db21c800eee7177cb29f8fc3056 |
|
BLAKE2b-256 | df5cbf2cae92222513cc23b3ff85c4a1bb2811a2c3583ac0f8e8d502751de934 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 459.5 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11bce6164887cd491ca75c2326a113ba934be596e22b28b1742ce27b1d076467 |
|
MD5 | 0f05d6e97985de9a708cdfc0daf12738 |
|
BLAKE2b-256 | 5d9aadd3e6fef267658075c5a41573c26d42d80c935cdc992384dfae435feaef |
File details
Details for the file safetensors-0.5.3-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 502.2 kB
- Tags: CPython 3.8+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1077f3e94182d72618357b04b5ced540ceb71c8a813d3319f1aba448e68a770d |
|
MD5 | 461b1af09dc8bef1a13a3736572f853c |
|
BLAKE2b-256 | ce201fbe16f9b815f6c5a672f5b760951e20e17e43f67f231428f871909a37f6 |
File details
Details for the file safetensors-0.5.3-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 418.4 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21d01c14ff6c415c485616b8b0bf961c46b3b343ca59110d38d744e577f9cce7 |
|
MD5 | bd61d5a65393044dc519a459d16c11c2 |
|
BLAKE2b-256 | b83b11f1b4a2f5d2ab7da34ecc062b0bc301f2be024d110a6466726bec8c055c |
File details
Details for the file safetensors-0.5.3-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: safetensors-0.5.3-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 436.9 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd20eb133db8ed15b40110b7c00c6df51655a2998132193de2f75f72d99c7073 |
|
MD5 | f82b78c3baf3d723140bdbd8badf70cc |
|
BLAKE2b-256 | 18ae88f6c49dbd0cc4da0e08610019a3c78a7d390879a919411a410a1876d03a |