Speeding up Model Loading with fastsafetensors
Not on the map. Why?
Abstract (arXiv)
The rapid increases in model parameter sizes introduces new challenges in pre-trained model loading. Currently, machine learning code often deserializes each parameter as a tensor object in host memory before copying it to device memory. We found that this approach underutilized storage throughput and significantly slowed down loading large models with a widely-used model file formats, safetensors. In this work, we present fastsafetensors, a Python library designed to optimize the deserialization of tensors in safetensors files. Our approach first copies groups of on-disk parameters to device memory, where they are directly instantiated as tensor objects. This design enables further optimization in low-level I/O and high-level tensor preprocessing, including parallelized copying, peer-to-peer DMA, and GPU offloading. Experimental results show performance improvements of 4.8x to 7.5x in loading models such as Llama (7, 13, and 70 billion parameters), Falcon (40 billion parameters), and the Bloom (176 billion parameters).
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). First posted on arXiv 29 May 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2025Anatomy of a Machine Learning Ecosystem: 2 Million Models on Hugging Facecited by 12
- 2025CryptoTensors: A Light-Weight Large Language Model File Format for Highly-Secure Model Distributioncited by 0
- 2026The Serialized Bridge: Understanding and Recovering LLM Serving Performance under Blackwell GPU Confidential Computingcited by 0
- 2026The Serialized Bridge: Understanding and Recovering LLM Serving Performance under Blackwell GPU Confidential Computing22 Jun 2026
- 2025CryptoTensors: A Light-Weight Large Language Model File Format for Highly-Secure Model Distribution4 Dec 2025
- 2025Anatomy of a Machine Learning Ecosystem: 2 Million Models on Hugging Face9 Aug 2025