Introduction
This document describes how to develop Safetensors on Kunpeng servers, including source code build, installation, and development verification.
The Safetensors file header uses a simple structure where JSON is used to describe metadata, followed by a pure binary data area. This completely eliminates the logic of traditional Pickle serialization that may execute arbitrary code, thereby fundamentally blocking the security risks caused by the loading of malicious model files. With its open source ARM64 architecture compatibility, Safetensors can directly run on the openEuler operating system without code reconstruction. The loading speed can be improved by several times due to zero-copy memory mapping.
Safetensors does not depend on GPUs. CUDA or GPU runtime is not required for source code build and function verification.