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

本站现有博文323篇,共被浏览794963

本站已经建立2492天!

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