safetensors
by Hugging Face · Framework · Text & code
A file format and library for saving and loading neural network weights safely and quickly, reading checkpoints from disk into memory or onto a GPU.
Latest · Nov 19safetensors 0.8.0 maps checkpoints privately (rw-p); get_slice[...] then .to('cuda') left 512 of 512 MiB as private copies on the Spark, but .clone() first left 0.
AccessOpen codeLicenseApache 2.0
Seen running on
| Machine | Speed | How | Seen by |
|---|---|---|---|
| 1 run on 128 GB | |||
Evidence
- Nov 19Workarounds leaving no copies in every run: .clone() before copying, backend='pread' (0.8.0 or later), and load_file(..., device='cuda:0'). safe_open with device='cuda:0' left none in two of three runs.Hands-on test
NVIDIA forums: DGX Spark