skillfed

fastsafetensors

High-performance safetensors model loader

fastsafetensors v0.3.3 2.1M downloads/30d#3,299 on PyPI163
Permissive license Apache-2.0 Active released

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 fastsafetensors

uv

uv add fastsafetensors

poetry

poetry add fastsafetensors

Installing 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

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

fast safetensors loadermodel loading optimizationsafetensors performanceGPU model deserializationefficient tensor file loading
model-loadingperformance-optimizationgpu-io

More Artificial Intelligence packages

Further reading