safetensors
What is a .safetensors file?
application/x-safetensors
safetensors is a simple, safe binary format for storing model weights. An 8-byte length precedes a JSON header that maps each tensor name to its dtype, shape, and byte offsets, followed by the raw tensor data — with no executable code, unlike Python pickles. It has become a common format for sharing model checkpoints.
How to use a .safetensors file
Use an example safetensors file to test weight loaders and inspectors, header parsing, and conversion to or from other checkpoint formats. This sample holds meaningless values, not a trained model.