rustio rustio.net
68

safetensors

v0.7.0 Growing

Provides 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.

Apache-2.0 Edition 2021 MSRV 1.80
#tensorflow#pytorch#huggingface#tensors#safetensors

Quick Verdict

  • !Pre-1.0: API may have breaking changes
  • βœ“Massive adoption (1.3K crates depend on it)
  • βœ“Permissive license (Apache-2.0)

Security

Checking security advisories...
Downloads
11.0M
Dependents
1.3K
Releases
21
Size
31KB

Deep Insights

πŸ“ˆ
Strong growth momentum

2.5M downloads in the last 30 days (83.5K/day), up 112% from the previous period.

πŸ”—
Widely adopted

1.3K crates depend on safetensors. Strong ecosystem adoption means battle-tested code and long-term stability.

πŸ”¬
Pre-1.0 for over a year

Despite being 3+ years old, safetensors hasn't reached 1.0 yet. Expect potential API changes between versions.

πŸ“
Compact crate

At 30KB, safetensors is lightweight. Small crate size correlates with focused, well-scoped functionality.

🌟
Used by top crates

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

Maintenance 16/25

Recency, release consistency, active ratio

Quality 16/25

Yanked ratio, deps, size, maturity, features

Community 13/20

Reverse deps, ownership, ecosystem

Popularity 8/15

Downloads, momentum, growth trend

Documentation 15/15

Docs, repo, license, metadata

Download Trend

Daily downloads Β· last 90 days
47K/day avg+197%
050K100K150K200K250K12/291/162/32/213/113/28

Top Dependents

Version Adoption

v0.3.3
45%
v0.4.5
33%
v0.6.2
11%
v0.7.0
8%
v0.4.2
3%

Release Timeline

21 releasessince 2022
J
F
M
A
M
J
J
A
S
O
N
D
2022
2
2023
7
2024
4
2025
8
2026
Less
More

Feature Flags

default =["std"]

std*alloc

README

Loading README...

Maintainers

Dependencies
6
direct dependencies
Dependents
1.3K
crates depend on safetensors

Similar Crates