safetensors/safetensors
Simple, safe way to store and distribute tensors observed · 2026-08-28
Health v2 · maintenance only
91/100
- Activity 99
- Release rhythm 75
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 48
- age_days: 1441
- days_rel: 85
- days_push: 7
- n_releases_24m: 10
Adoption not part of the score
3876 stars · 354 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Safetensors is a simple, secure file format and library for storing and distributing tensors, designed as a fast zero-copy alternative to pickle-based weight storage. It provides bindings for Python (PyTorch, TensorFlow, JAX, NumPy) and a native Rust implementation.
Use cases
- save model weights without pickle security risks
- load pytorch model checkpoints fast with zero-copy mmap
- convert pickle .bin weights to safetensors format
- read tensor metadata like shapes and dtypes via HTTP range requests
- share model weights safely on the hugging face hub
- load only part of a large tensor for multi-GPU sharding
When to choose
- you need to store or distribute neural network weights securely
- you want faster checkpoint loading than pickle-based .bin files
- you work in the Hugging Face ecosystem with Transformers or Diffusers
- you need lazy or partial loading of large tensors
When to avoid
- you need to serialize arbitrary Python objects or non-tensor data
- you require a format with built-in compression
- you need full model architecture serialization rather than just tensors
Facets
library · maturity stable
serialization machine-learning deep-learning developer-tools machine-learning deep-learning large-language-models developer-tools files cross-platform python rust cli tensors model-weights zero-copy pickle-alternative hugging-face file-format pytorch tensorflow jax mmap
10 sources
- readme: https://github.com/safetensors/safetensors · fetched 2026-08-28 · 233fca709e37
- homepage: https://huggingface.co/docs/safetensors · fetched 2026-08-29 · 7fa2c18b9c26
- site_page: https://huggingface.co/docs/safetensors/metadata_parsing · fetched 2026-08-29 · 5314e96b6508
- site_page: https://huggingface.co/docs · fetched 2026-08-29 · bdec26667b98
- site_page: https://huggingface.co/docs/safetensors/speed · fetched 2026-08-29 · 61cd81a32889
- site_page: https://huggingface.co/docs/safetensors/torch_shared_tensors · fetched 2026-08-29 · 4b5e83a1ef14
- site_page: https://huggingface.co/docs/safetensors/convert-weights · fetched 2026-08-29 · 28b914d276c3
- site_page: https://huggingface.co/docs/safetensors/api/torch · fetched 2026-08-29 · 2b027f49be6b
- site_page: https://huggingface.co/docs/safetensors/api/tensorflow · fetched 2026-08-29 · 0ca305d33ee3
- site_page: https://huggingface.co/pricing · fetched 2026-08-29 · de6b7a178be5
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| safetensors/safetensors | main | 91 |
For agents
markdown · JSON · MCP: product_card(name="safetensors/safetensors")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem