Model weight and checkpoint storage. Safetensors separates tensor data from layout metadata: a JSON header describes each tensor's name, shape, dtype and byte offset, followed by the raw tensor bytes, enabling mmap zero-copy loading; in contrast, PyTorch's default `torch.save` uses pickle serialization, and unpickling executes arbitrary code carried by `__reduce__`, an RCE risk. Checkpoint layouts: single files are simple but coarse-grained; large models use sharded checkpoints (one shard per rank/layer group plus an index.json) for parallel save/load. A model registry (Hugging Face Hub style) pairs a Model Card (purpose, limitations, data and training info) with immutable versions, rollback and canary support. Size and load-time estimates: FP16 weights cost
S=2×Nparams bytes and load in
T=S/B (
B = IO bandwidth), e.g. a 70B model
S≈140GB takes roughly 12 seconds at 12GB/s PCIe.