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

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

本站已经建立2642天!

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