fastsafetensors
High-performance safetensors model loader
What it is and what it does
fastsafetensors is a high-performance loader for safetensors model files, designed to accelerate model initialization in machine learning frameworks. It replaces the default safetensors deserializer with optimized I/O routines that exploit GPU and storage hardware capabilities—including NVIDIA GDS, AMD ROCm, and NVMe—to reduce model loading time. The library integrates into existing tools as a command-line option.
The package provides both a direct Python API and CLI integration via typer. It supports Linux/CUDA, ROCm, Windows, and specialized storage systems like 3FS and unified-memory architectures. Installation requires a precompiled wheel for your Python version and architecture.
Use it for:
- Reduce startup time when serving large language models by using fastsafetensors as the model loader.
- Speed up model initialization in custom Python code that loads large safetensors files from local or remote storage.
- Optimize model loading on AMD ROCm systems or systems with GPU Direct Storage to maximize NVMe throughput.
- Integrate into machine learning inference pipelines where model load time is a bottleneck.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Loads safetensors model files significantly faster than the standard safetensors deserializer by optimizing I/O patterns for GPU and storage systems.
Yes, if you load large safetensors models and want faster initialization. The package is actively maintained, has no known vulnerabilities, and offers substantial speedups with minimal friction—install and use the API or CLI. Medium install friction is standard for compiled packages with architecture-specific wheels.
Install
fastsafetensors on PyPI
pip
pip install fastsafetensorsuv
uv add fastsafetensorspoetry
poetry add fastsafetensorsInstalling fastsafetensors
Before you install
Medium install friction due to compiled wheels for specific Python versions (3.10–3.14) and architectures (x86_64, aarch64, Windows). Active maintenance with recent commits and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain license notices in distributions.
Quickstart
pip install fastsafetensors
import fastsafetensors
# Use fastsafetensors APIs directly (see docs/overview.md)
Requires Python 3.10–3.14; compiled wheels are architecture-specific (x86_64, aarch64, Windows); performance gains depend on platform and storage backend.
Verify before relying
- Whether PyTorch 2.11.0 is required or if other versions are compatible despite CI testing only that version.
- Whether GDS (GPU Direct Storage) is required for documented performance gains or if fallback paths work without it.
- Whether typer is used for CLI tooling or is a transitive dependency.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — typer |
| Maintenance | actively maintained — 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,095,638/month — #3,299 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fastsafetensors-0.3.3-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; fastsafetensors-0.3.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastsafetensors-0.3.3-cp310-cp310-win_amd64.whl; fastsafetensors-0.3.3-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; fastsafetensors-0.3.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastsafetensors-0.3.3-cp311-cp311-win_amd64.whl; fastsafetensors-0.3.3-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; fastsafetensors-0.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastsafetensors-0.3.3-cp312-cp312-win_amd64.whl; fastsafetensors-0.3.3-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; fastsafetensors-0.3.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastsafetensors-0.3.3-cp313-cp313-win_amd64.whl; fastsafetensors-0.3.3-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; fastsafetensors-0.3.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; fastsafetensors-0.3.3-cp314-cp314-win_amd64.whl
Keywords: fastsafetensors, safetensors, GDS
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
instanttensorInstantTensor provides a high-throughput…
permissive · top 15,000 on PyPI
safetensorsSerializes and deserializes tensors to and from…
permissive · top 1,000 on PyPI
compressed-tensorsProvides a unified format for storing and…
permissive · top 5,000 on PyPI
mmgpOptimizes GPU memory usage for running large…
unclear · top 15,000 on PyPI
sgl-kernelsgl-kernel provides optimized CUDA compute…
permissive · top 15,000 on PyPI
cutensornet-cu13cuTensorNet is a GPU-accelerated library for…
unclear · top 15,000 on PyPI
sglangSGLang is a serving framework that runs large…
permissive · top 1,000 on PyPI
nvidia-cusparse-cu12Provides NVIDIA CUSPARSE native runtime…
unclear · top 1,000 on PyPI
cutensor-cu12cuTENSOR is a CUDA library for high-performance…
unclear · top 15,000 on PyPI
nvidia-cutlass-dsl-libs-baseProvides Python interfaces for writing…
unclear · top 5,000 on PyPI