EADST

Safetensors: Safe and Efficient Tensor Storage

Safetensors is a library for safely and efficiently saving and loading PyTorch tensors. Unlike traditional formats like pickle, Safetensors is designed to prevent arbitrary code execution, offering a more secure way to handle tensor data.

import torch
from safetensors import save_file, load_file

# Create a tensor
tensor = torch.rand(3, 3)

# Save the tensor
save_file({"tensor": tensor}, "tensor_data.safetensors")

# Load the tensor
loaded_tensors = load_file("tensor_data.safetensors")
loaded_tensor = loaded_tensors["tensor"]
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
FP16 Review Github uwsgi Firewall Qwen DeepSeek Python Proxy Pickle Markdown Magnet v2ray 继承 QWEN Plate CV CTC Ptyhon Diagram Ubuntu Numpy Translation SQL Conda GGML 论文 Input Hilton Datetime Rebuttal SAM Heatmap HaggingFace Breakpoint SQLite RL NLTK VPN 关于博主 Qwen2.5 TensorRT Jetson 算法题 Tracking Knowledge TTS Animate DeepStream COCO Pytorch Card FP32 Docker 公式 Michelin 音频 图形思考法 News Clash API 强化学习 Baidu Logo ms-swift Image2Text Password LLM WAN CC Mixtral BTC transformers Pandas 版权 RAR icon YOLO Web 域名 FP8 LLAMA InvalidArgumentError TSV 飞书 多线程 CEIR Git CSV 财报 Django UNIX C++ 云服务器 MD5 Land GPT4 CUDA Gemma Vim LoRA Interview LeetCode SPIE OCR Shortcut Video Bin Paper AI Website Miniforge Transformers NameSilo 阿里云 ResNet-50 TensorFlow Anaconda uWSGI llama.cpp v0.dev JSON Search Claude PyCharm mmap FP64 Statistics Cloudreve Disk NLP BF16 Excel CAM SVR printf Augmentation ModelScope torchinfo GoogLeNet Use Domain FlashAttention Permission PDF XML BeautifulSoup Bipartite Plotly IndexTTS2 论文速读 Tensor hf EXCEL VGG-16 Hungarian 证件照 RGB tqdm 净利润 GIT git Data Streamlit Jupyter Nginx Template Freesound 搞笑 多进程 Attention UI 签证 Vmess Qwen2 logger PIP 腾讯云 ONNX Base64 Pillow Agent 第一性原理 Quantize FastAPI Dataset Bitcoin diffusers OpenCV Sklearn scipy Food HuggingFace 顶会 图标 git-lfs Tiktoken VSCode PyTorch Linux LaTeX Safetensors XGBoost Llama Paddle GPTQ tar Algorithm ChatGPT Distillation Quantization Bert Zip Math OpenAI 报税 Color WebCrawler Google Windows Crawler PDB Random CLAP 递归学习法 Hotel
站点统计

本站现有博文332篇,共被浏览870582

本站已经建立2579天!

热门文章
文章归档
回到顶部