Safetensors Joins the PyTorch Foundation: A Leap Toward a Safer ML Ecosystem
Today marks a significant milestone for the machine learning community as Safetensors officially joins the PyTorch Foundation as a foundation-hosted project under the Linux Foundation. This collaboration alongside established projects like DeepSpeed, Helion, Ray, and vLLM paves the way for exciting developments in model distribution and machine learning collaboration.
How Safetensors Came to Be
Safetensors originated from a clear need within the machine learning realm—an innovative way to store and share model weights without the risk of executing potentially harmful code. Prior to Safetensors, the ecosystem predominantly relied on pickle-based formats, which posed a risk of inadvertently running malicious scripts. As the landscape of machine learning expanded, this risk became increasingly untenable.
The design philosophy behind Safetensors is refreshingly straightforward. It employs a JSON header that outlines tensor metadata, capped at 100MB, which is followed by raw tensor data. This format facilitates zero-copy loading, allowing tensors to be mapped directly from disk, paired with lazy loading capabilities. This means that individual weights can be accessed without the need to deserialize an entire checkpoint, leading to a more efficient workflow.
To our pleasant surprise, Safetensors experienced widespread adoption. Today, it stands as the default format for model distribution across platforms such as the Hugging Face Hub, boasting usage by tens of thousands of models across various modalities in ML. Essentially, Safetensors has become the preferred choice for the open-source machine learning community.
The Significance of Joining the PyTorch Foundation
Aligning Safetensors with the PyTorch Foundation positions the project in a vendor-neutral environment. This represents not just a technical collaboration, but also a commitment to community governance. While the project remains open-source, consolidating contributions from diverse companies ensures that its evolution mirrors the broader ecosystem’s demands.
By placing the governance, trademark, and repository within the Linux Foundation, we can foster a more collaborative environment. Notably, the core maintainers from Hugging Face, Luc Georges and Daniel, continue to direct the day-to-day operations while also contributing to the Technical Steering Committee. This partnership strengthens the belief that safety can only thrive in a transparent, community-driven atmosphere.
What This Means for Users and Contributors
For the vast majority of users, the transition is seamless—there will be no breaking changes in the format, APIs, or Hub integration. Models in the Safetensors format will continue to function as they previously did, providing peace of mind for established users.
However, for contributors, the landscape is evolving. The path to becoming a maintainer is now formally documented. Everyone in the community can take part in shaping the project’s future. The governance documents—GOVERNANCE.md and MAINTAINERS.md—are readily available in the repository, ensuring transparency and accessibility for all stakeholders. For organizations utilizing Safetensors, the neutral governance under the Linux Foundation assures a stable and long-term foundation.
Looking Ahead: The Next Chapter for Safetensors
Although Safetensors is already well-established, we perceive ourselves to be at the early stages of a grand journey. Exciting work is underway with the PyTorch team to integrate Safetensors as a serialization system for core PyTorch models.
In the upcoming months, we anticipate significant developments. One of our primary goals is to introduce device-aware loading and saving, which will enable tensors to load directly onto CUDA, ROCm, and other accelerators without unnecessary delay. Additionally, we are focused on creating first-class APIs for Tensor Parallel and Pipeline Parallel loading, allowing each rank or pipeline stage to access only the necessary weights.
As the machine learning ecosystem’s needs evolve, we also aim to formalize support for emerging formats like FP8 and block-quantized formats such as GPTQ and AWQ. By working within the PyTorch Foundation, we can tackle these challenges collaboratively, promoting shared solutions that benefit the broader community.
Get Involved with Safetensors
Safetensors is wholly committed to being an open-source project where contributions are not just welcomed but encouraged. Opportunities for involvement range from bug reports and documentation improvements to significant feature enhancements.
If you are a developer, researcher, or organization utilizing Safetensors and wish to play a more active role in its development, don’t hesitate to engage. You can open an issue, initiate a discussion, or directly reach out to the maintainers. Together, we can shape the future of Safetensors, affirming its place as a vital tool for the community it serves.
Inspired by: Source

