Skip to main content
All terms
Data

Safetensors

A safe, fast file format for storing model weights.

Definition

Safetensors is a file format for storing model weights (the trained numbers that make up a model), designed to replace older save formats that can run hidden, arbitrary code when a file is opened. It stores only the number data and basic labels, which removes that danger, and lets a program read the numbers straight from the file into memory without copying them first. That makes serving engines load large weights quickly, reducing startup time.