safetensorssafetensors
safetensors
解决什么问题What problem it solves
一种更安全的模型权重文件格式。A safer file format for model weights.
这是什么What it is
官方描述:一种新的简单张量存储格式,安全(相对 pickle)且仍然快(零拷贝)。
官方指出 pickle 不安全、会执行任意代码;该格式支持懒加载。
The official description: a simple format for storing tensors safely (as opposed to pickle) that is still fast (zero-copy).
The docs state pickle is unsafe and runs arbitrary code; the format supports lazy loading.
为什么需要知道Why it matters
加载不可信权重,等于运行别人写的代码。先看格式。Loading untrusted weights is running someone else's code. Check the format first.
现在能做什么What you can do now
回到名词地图看第5站的其他 29 个词 →Back to the map: the other 29 terms in station 5 →
出处Sources
- safetensors 官方仓库safetensors repository ↗