# Safetensors

7 Hacker News commenters recommended Safetensors and 2 criticized it, November 2025 to November 2026. It was recommended in 4 of 13 months.

**Verdict:** Recommended as a safe alternative to pickle for model weights, since it stores only data and cannot run code on load. Caveat: pth files remain exploitable.

## Why people recommend it

- Prevents remote code execution (2 comments): "Safetensors solves RCE, but it doesn't solve legal liability." ([source](https://news.ycombinator.com/item?id=46757565)) "which is just data and doesn't suffer from that issue" ([source](https://news.ycombinator.com/item?id=46753764))
- Purpose-built fix for pickle (3 comments): "safetensors was created specifically to address this" ([source](https://news.ycombinator.com/item?id=47713340)) "there is already a solution for this, SafeTensors" ([source](https://news.ycombinator.com/item?id=46753542)) "If everyone used Safetensors, this tool wouldn't need to exist" ([source](https://news.ycombinator.com/item?id=46291388))
- Makes pickle-only tools unnecessary (2 comments): "If everyone used Safetensors, this tool wouldn't need to exist" ([source](https://news.ycombinator.com/item?id=46291388)) "you'd think it would be worth it to avoid situations like this" ([source](https://news.ycombinator.com/item?id=47502906))

## What people warn about

- Does not cover every security risk (2 comments): "Safetensors solves RCE, but it doesn't solve legal liability." ([source](https://news.ycombinator.com/item?id=46757565)) "safetensors is just as vulnerable to this sort of exploit using a pth file since it's a Python package." ([source](https://news.ycombinator.com/item?id=47503017))

## Alternatives hackers recommend

- [Apache Parquet](https://hackerapproved.com/p/parquet.md): 40 recommend
- [JSON Canvas](https://hackerapproved.com/p/json-canvas.md): 7 recommend
- [F3 file format](https://hackerapproved.com/p/f3.md): 6 recommend

## Cite as

Hacker Approved, "Safetensors", https://hackerapproved.com/p/safetensors/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
