High-performance safetensors model loader
Project description
fastsafetensors
fastsafetensors is an efficient safetensors loader. If you develop your own code that loads large safetensors files, you can try fastsafetensors APIs (see docs). For example, vLLM and SGLang have --load-format fastsafetensors command-line argument to speed up their initialization.
This library supports Linux/CUDA, ROCm without GDS, Windows, 3FS, unified-memory systems such as DGX Spark, and so on. We welcome more platform/storage-specific optimizations like them by adding new copier backends. Our CI tests Python 3.10-3.14 with PyTorch 2.11.0.
Performance Highlights
Performance highlights from the CLOUD 2025 paper and benchmark docs:
- Standalone model loading was 4.8x-7.5x faster than the default
safetensorsdeserializer on Llama, Falcon, and Bloom models, and reached 26.4 GB/s NVMe read throughput for Llama-70B on four GPUs with GDS. - In the paper's vLLM integration experiment, startup time dropped from 12.39s to 4.74s for Llama-2-13B on 4x L40S GPUs, and from 16.04s to 6.88s on 1x A100.
- On AMD ROCm without GDS, the documented
nogdspath reached 6.02 GB/s for GPT-2 Medium versus 1.28 GB/s withmmap(4.7x throughput), and 2.62 GB/s for GPT-2 versus 1.01 GB/s withmmap(2.6x throughput). See the report for more details.
Quick Start
pip install fastsafetensors
pip install vllm # for quick demo
vllm serve Qwen/Qwen3-0.6B --load-format fastsafetensors
...
Loading safetensors using Fastsafetensor loader: 0% Completed | 0/1 [00:00<?, ?it/s]
Loading safetensors using Fastsafetensor loader: 100% Completed | 1/1 [00:00<00:00, 1.23it/s]
Design Details
See Overview for features, basic API usage, and configuration.
Code of Conduct
Please refer to Foundation Model Stack Community Code of Conduct.
Development
See Development.
Publication
Takeshi Yoshimura, Tatsuhiro Chiba, Manish Sethi, Daniel Waddington, Swaminathan Sundararaman. (2025) Speeding up Model Loading with fastsafetensors arXiv:2505.23072 and IEEE CLOUD 2025.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastsafetensors-0.3.2.tar.gz.
File metadata
- Download URL: fastsafetensors-0.3.2.tar.gz
- Upload date:
- Size: 70.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e358fce238684613a5c3ebb7800c52c5b3270c0bb5e4ed2191ee8f3d0431de1
|
|
| MD5 |
4c5864dbaba49ae2b52d20c3f65d68e3
|
|
| BLAKE2b-256 |
c833c97b2bcbe06e0f011eedee0f41d4060f6344901a53c2703acc3dd7429713
|
File details
Details for the file fastsafetensors-0.3.2-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 204.9 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
100c3c631bcac88062512ba7b650a192a5b51fca218accac1b523db68d27a402
|
|
| MD5 |
476e4b2f1ab77a330aaf186ef35babb5
|
|
| BLAKE2b-256 |
9bd0a60adcec19b13446f7711755c251f3fd0cadb21d3943d8b714b84c0605bb
|
File details
Details for the file fastsafetensors-0.3.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a50da42cf2d85cc8a50f945126decb4ce18aa4151506dd416482dd50a613fa97
|
|
| MD5 |
a5274a393d5fa1be86497ed99056bdfe
|
|
| BLAKE2b-256 |
096fcafbb1e1089593c919f8a73575e1b332c111aa990e8f07844fee4246dd07
|
File details
Details for the file fastsafetensors-0.3.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.14, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
826079a657a222a6c9c9fe749a303509386f88719569d53358ac53a8823bfbcd
|
|
| MD5 |
52ba0984151a336392c8cf3028308232
|
|
| BLAKE2b-256 |
895f536d5000e3468fc0b00e0b96c388fd8071477c32fb4325d1ae4f71e5ec52
|
File details
Details for the file fastsafetensors-0.3.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 202.0 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19459e96f4e732ae8470a44362bd30d00da20a76c61cd75e894855d4d0739205
|
|
| MD5 |
ff75be1c90f7cfdcc1dc6483b44f1fbb
|
|
| BLAKE2b-256 |
ac9e666806437c65acec5471d73af36a8cf5875db762dd9e4197531c6ad8e7c4
|
File details
Details for the file fastsafetensors-0.3.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41297f01d3e2585e86fbc56df499f140b233ec8d6cb17c3f95b5e81a8b98a53e
|
|
| MD5 |
a84c724753613e753f0941e8037f0053
|
|
| BLAKE2b-256 |
e44357fd9ee68a39f1a5fba0dd9be6b62f14460bab532840eb8198202fd73d30
|
File details
Details for the file fastsafetensors-0.3.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93cd3fd6f3c66334edbfc64f3e2457f4b622c38c16074616a0dc2d972b0a65b7
|
|
| MD5 |
00bfab46ae0fb1f818e79a82950c8aa1
|
|
| BLAKE2b-256 |
37399e5ba486b82f547bec40543e10077e44b3eca4d92da381bcb0780b1169fd
|
File details
Details for the file fastsafetensors-0.3.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 202.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b02dd7a2332013c24cce1fb9cd037326c6b52dd25e84fa07d02d61c6301b54e8
|
|
| MD5 |
f9fc9665a599aa77a0aeab02d661f803
|
|
| BLAKE2b-256 |
45d38c05a01aa9518c5118d133a6554334f642ef08f050d0b94f7daac539d265
|
File details
Details for the file fastsafetensors-0.3.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a932d7166c9e17e48aca3e5503d326bc6fc73fce6dc985ae6bd2ccc0f308b14
|
|
| MD5 |
d2105bc95b36b5f02008b03874b86116
|
|
| BLAKE2b-256 |
e968a31c1661adf4d1b5ec29470ff991bde9094e4f347b0e6d1af8ba6b560d32
|
File details
Details for the file fastsafetensors-0.3.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69f4d8cbd3b542e5ddf7fee8136cf35e1524f9c30e118f64a0e846dab7e8de6b
|
|
| MD5 |
d0cfa787c2801a87d0d1de1698c1e683
|
|
| BLAKE2b-256 |
c9bb9f821eac9bddd41ea1c5cd9b6a597c002741f022ecf6f3ba5cfcc3e9c950
|
File details
Details for the file fastsafetensors-0.3.2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 200.8 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2059829de1762a7607ce707c17267c81cc1713fbe72dafc3b7ba55fc2632f73
|
|
| MD5 |
c996d937857cd6cd3c0384bdfbbbab8d
|
|
| BLAKE2b-256 |
c46ac74d5c83cf03226332767fd35fc11d20f2b1e4fc28eb742b029f06f571ff
|
File details
Details for the file fastsafetensors-0.3.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b8780ff0291ff4c9a440c7b25cb8a8b963d8600ab86b89b2a8aebea26d58366
|
|
| MD5 |
77589d9f2b5c22e91456d2629e2a06d6
|
|
| BLAKE2b-256 |
238fade9adae5853eb7bb674bfd97f340ab7bfea7afaade508fd791ffb06c3b7
|
File details
Details for the file fastsafetensors-0.3.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
912b8b1ef169e39c1daf2477a3f4f10a1953a50444c0f93264321a87a5b42cf2
|
|
| MD5 |
e16623b98a9908204524aea7609f5c52
|
|
| BLAKE2b-256 |
fe0c648d52f31c351efbdd9b222fd80e2b4ed8e11d3f68ea3b65af628dbe480a
|
File details
Details for the file fastsafetensors-0.3.2-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 199.9 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ea80402c203a55dccbcf5f0f5aa7c3b6a432a7dda8f4663dd7c8418e4257877
|
|
| MD5 |
c910fe80eb0cb79c7476531d28b4dc06
|
|
| BLAKE2b-256 |
325604b80105e7286f53361dfc347a180a96a3960fa47240107fc2acd4ab34b0
|
File details
Details for the file fastsafetensors-0.3.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ff3f8cbc2ad0f8730728bec8aeb43b7bcbff1dae37ede2ea0a946062a8da62b
|
|
| MD5 |
b029661ed53a13c4d88b0b0485b32204
|
|
| BLAKE2b-256 |
6687590d52e847f1e7a71a92398274504604c462ec67c4d8286e79a0dbca4cb1
|
File details
Details for the file fastsafetensors-0.3.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: fastsafetensors-0.3.2-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.26+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e34eb6ce278cdf35a677fedf235809a93dca255e13b88a96f9c4dd49c0fcbd13
|
|
| MD5 |
a62ba91764f880065c8f0f00bb9cd114
|
|
| BLAKE2b-256 |
fc6912598d840d364ed9601e2e54462c6bd0b582651c0e42d789e6b498015901
|