safetensors
v0.7.0 GrowingProvides functions to read and write safetensors which aim to be safer than their PyTorch counterpart. The format is 8 bytes which is an unsized int, being the size of a JSON header, the JSON header refers the `dtype` the `shape` and `data_offsets` which are the offsets for the values in the rest of the file.
Quick Verdict
- !Pre-1.0: API may have breaking changes
- βMassive adoption (1.3K crates depend on it)
- βPermissive license (Apache-2.0)
Security
Deep Insights
2.5M downloads in the last 30 days (83.5K/day), up 112% from the previous period.
1.3K crates depend on safetensors. Strong ecosystem adoption means battle-tested code and long-term stability.
Despite being 3+ years old, safetensors hasn't reached 1.0 yet. Expect potential API changes between versions.
At 30KB, safetensors is lightweight. Small crate size correlates with focused, well-scoped functionality.
Notable dependents include tch, candle-core, ug, candle-nn, tract-nnef. When high-quality crates choose safetensors, it's a strong quality signal.
Health Breakdown
Recency, release consistency, active ratio
Yanked ratio, deps, size, maturity, features
Reverse deps, ownership, ecosystem
Downloads, momentum, growth trend
Docs, repo, license, metadata
Download Trend
Top Dependents
Most downloaded crates that depend on safetensors
Version Adoption
Release Timeline
Feature Flags
default =["std"]