--- id: fastsafetensors version: "0.3.3" license: Apache-2.0 license_treatment: permissive maintenance: active --- # fastsafetensors — High-performance safetensors model loader License: permissive · Maintenance: active · Downloads: 2.1M/mo ## 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 above — 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 pip install fastsafetensors uv add fastsafetensors 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_current - Install friction: medium - Maintenance: active - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags fast safetensors loader, model loading optimization, safetensors performance, GPU model deserialization, efficient tensor file loading, model-loading, performance-optimization, gpu-io [View on SkillFed](https://skillfed.io/packages/fastsafetensors) · [View on PyPI](https://pypi.org/project/fastsafetensors/)