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

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

本站已经建立2579天!

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