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

本站现有博文334篇,共被浏览930722

本站已经建立2639天!

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