[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-huggingface--safetensors":3,"tool-huggingface--safetensors":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":76,"owner_website":81,"owner_url":82,"languages":83,"stars":100,"forks":101,"last_commit_at":102,"license":103,"difficulty_score":104,"env_os":105,"env_gpu":106,"env_ram":106,"env_deps":107,"category_tags":111,"github_topics":80,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":112,"updated_at":113,"faqs":114,"releases":144},2506,"huggingface\u002Fsafetensors","safetensors","Simple, safe way to store and distribute tensors","Safetensors 是由 Hugging Face 推出的一种专为存储和分发张量（Tensors）设计的新型文件格式。在人工智能和深度学习领域，模型权重通常以文件形式保存，而传统的保存方式（如 Python 的 pickle 模块）存在显著的安全隐患，可能在加载恶意文件时执行任意代码。Safetensors 正是为了解决这一核心痛点而生，它提供了一种简单且安全的替代方案，确保用户在加载模型时无需担心代码注入风险。\n\n除了安全性，Safetensors 在性能上也表现出色。它支持“零拷贝”（zero-copy）机制，这意味着数据可以直接从磁盘映射到内存，无需经过额外的复制过程，从而大幅提升了加载速度并降低了内存占用。其文件格式设计简洁直观：文件头部包含一个 JSON 格式的元数据，清晰定义了每个张量的名称、数据类型、形状以及在文件中的具体位置；随后则是紧凑的二进制数据缓冲区。这种结构不仅便于解析，还具有良好的跨语言兼容性，目前官方提供了 Python 和 Rust 的支持。\n\nSafetensors 非常适合 AI 开发者、机器学习研究人员以及需要频繁处理大规模模型权重的工程团队使用","Safetensors 是由 Hugging Face 推出的一种专为存储和分发张量（Tensors）设计的新型文件格式。在人工智能和深度学习领域，模型权重通常以文件形式保存，而传统的保存方式（如 Python 的 pickle 模块）存在显著的安全隐患，可能在加载恶意文件时执行任意代码。Safetensors 正是为了解决这一核心痛点而生，它提供了一种简单且安全的替代方案，确保用户在加载模型时无需担心代码注入风险。\n\n除了安全性，Safetensors 在性能上也表现出色。它支持“零拷贝”（zero-copy）机制，这意味着数据可以直接从磁盘映射到内存，无需经过额外的复制过程，从而大幅提升了加载速度并降低了内存占用。其文件格式设计简洁直观：文件头部包含一个 JSON 格式的元数据，清晰定义了每个张量的名称、数据类型、形状以及在文件中的具体位置；随后则是紧凑的二进制数据缓冲区。这种结构不仅便于解析，还具有良好的跨语言兼容性，目前官方提供了 Python 和 Rust 的支持。\n\nSafetensors 非常适合 AI 开发者、机器学习研究人员以及需要频繁处理大规模模型权重的工程团队使用。如果你正在构建或部署深度学习模型，尤其是关注生产环境的安全性与效率，Safetensors 是一个值得采用的标准化工具。它既保留了传统格式的易用性，又通过现代化的设计解决了长期存在的安全与性能瓶颈，是目前大模型生态中日益主流的文件存储选择。","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsafetensors\u002Fassets\u002Fraw\u002Fmain\u002Fbanner-dark.svg\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsafetensors\u002Fassets\u002Fraw\u002Fmain\u002Fbanner-light.svg\">\n    \u003Cimg alt=\"Hugging Face Safetensors Library\" src=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsafetensors\u002Fassets\u002Fraw\u002Fmain\u002Fbanner-light.svg\" style=\"max-width: 100%;\">\n  \u003C\u002Fpicture>\n  \u003Cbr\u002F>\n  \u003Cbr\u002F>\n\u003C\u002Fp>\n\nPython\n[![Pypi](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fsafetensors.svg)](https:\u002F\u002Fpypi.org\u002Fpypi\u002Fsafetensors\u002F)\n[![Documentation](https:\u002F\u002Fimg.shields.io\u002Fwebsite\u002Fhttp\u002Fhuggingface.co\u002Fdocs\u002Fsafetensors\u002Findex.svg?label=docs)](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fsafetensors\u002Findex)\n[![Codecov](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fhuggingface\u002Fsafetensors\u002Fcoverage.svg?branch=main)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fsafetensors)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_safetensors_readme_23193c8ce2ee.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fsafetensors)\n\nRust\n[![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fsafetensors.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fsafetensors)\n[![Documentation](https:\u002F\u002Fdocs.rs\u002Fsafetensors\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Fsafetensors\u002F)\n[![Codecov](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fhuggingface\u002Fsafetensors\u002Fcoverage.svg?branch=main)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fsafetensors)\n[![Dependency status](https:\u002F\u002Fdeps.rs\u002Frepo\u002Fgithub\u002Fhuggingface\u002Fsafetensors\u002Fstatus.svg?path=safetensors)](https:\u002F\u002Fdeps.rs\u002Frepo\u002Fgithub\u002Fhuggingface\u002Fsafetensors?path=safetensors)\n\n# safetensors\n\n## Safetensors\n\nThis repository implements a new simple format for storing tensors\nsafely (as opposed to pickle) and that is still fast (zero-copy).\n\n### Installation\n#### Pip\n\nYou can install safetensors via the pip manager:\n\n```bash\npip install safetensors\n```\n\n#### From source\n\nFor the sources, you need Rust\n\n```bash\n# Install Rust\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\n# Make sure it's up to date and using stable channel\nrustup update\ngit clone https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\ncd safetensors\u002Fbindings\u002Fpython\npip install setuptools_rust\npip install -e .\n```\n\n### Getting started\n\n```python\nimport torch\nfrom safetensors import safe_open\nfrom safetensors.torch import save_file\n\ntensors = {\n   \"weight1\": torch.zeros((1024, 1024)),\n   \"weight2\": torch.zeros((1024, 1024))\n}\nsave_file(tensors, \"model.safetensors\")\n\ntensors = {}\nwith safe_open(\"model.safetensors\", framework=\"pt\", device=\"cpu\") as f:\n   for key in f.keys():\n       tensors[key] = f.get_tensor(key)\n```\n\n[Python documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fsafetensors\u002Findex)\n\n\n### Format\n\n- 8 bytes: `N`, an unsigned little-endian 64-bit integer, containing the size of the header\n- N bytes: a JSON UTF-8 string representing the header.\n  - The header data MUST begin with a `{` character (0x7B).\n  - The header data MAY be trailing padded with whitespace (0x20).\n  - The header is a dict like `{\"TENSOR_NAME\": {\"dtype\": \"F16\", \"shape\": [1, 16, 256], \"data_offsets\": [BEGIN, END]}, \"NEXT_TENSOR_NAME\": {...}, ...}`,\n    - `data_offsets` point to the tensor data relative to the beginning of the byte buffer (i.e. not an absolute position in the file),\n      with `BEGIN` as the starting offset and `END` as the one-past offset (so total tensor byte size = `END - BEGIN`).\n  - A special key `__metadata__` is allowed to contain free form string-to-string map. Arbitrary JSON is not allowed, all values must be strings.\n- Rest of the file: byte-buffer.\n\nNotes:\n - Duplicate keys are disallowed. Not all parsers may respect this.\n - In general the subset of JSON is implicitly decided by `serde_json` for\n   this library. Anything obscure might be modified at a later time, that odd ways\n   to represent integer, newlines and escapes in utf-8 strings. This would only\n   be done for safety concerns\n - Tensor values are not checked against, in particular NaN and +\u002F-Inf could\n   be in the file\n - Empty tensors (tensors with 1 dimension being 0) are allowed.\n   They are not storing any data in the databuffer, yet retaining size in the header.\n   They don't really bring a lot of values but are accepted since they are valid tensors\n   from traditional tensor libraries perspective (torch, tensorflow, numpy, ..).\n - 0-rank Tensors (tensors with shape `[]`) are allowed, they are merely a scalar.\n - The byte buffer needs to be entirely indexed, and cannot contain holes. This prevents\n   the creation of polyglot files.\n - Endianness: Little-endian.\n   moment.\n - Order: 'C' or row-major.\n - Notes: Some smaller than 1 byte dtypes appeared, which make alignment tricky. Non traditional APIs might be required for those.\n\n\n### Yet another format ?\n\nThe main rationale for this crate is to remove the need to use\n`pickle` on `PyTorch` which is used by default.\nThere are other formats out there used by machine learning and more general\nformats.\n\n\nLet's take a look at alternatives and why this format is deemed interesting.\nThis is my very personal and probably biased view:\n\n| Format                  | Safe | Zero-copy | Lazy loading | No file size limit | Layout control | Flexibility | Bfloat16\u002FFp8\n| ----------------------- | --- | --- | --- | --- | --- | --- | --- |\n| pickle (PyTorch)        | ✗ | ✗ | ✗ | 🗸 | ✗ | 🗸 | 🗸 |\n| H5 (Tensorflow)         | 🗸 | ✗ | 🗸 | 🗸 | ~ | ~ | ✗ |\n| SavedModel (Tensorflow) | 🗸 | ✗ | ✗ | 🗸 | 🗸 | ✗ | 🗸 |\n| MsgPack (flax)          | 🗸 | 🗸 | ✗ | 🗸 | ✗ | ✗ | 🗸 |\n| Protobuf (ONNX)         | 🗸 | ✗ | ✗ | ✗ | ✗ | ✗ | 🗸 |\n| Cap'n'Proto             | 🗸 | 🗸 | ~ | 🗸 | 🗸 | ~ | ✗ |\n| Arrow                   | ? | ? | ? | ? | ? | ? | ✗ |\n| Numpy (npy,npz)         | 🗸 | ? | ? | ✗ | 🗸 | ✗ | ✗ |\n| pdparams (Paddle)       | ✗ | ✗ | ✗ | 🗸 | ✗ | 🗸 | 🗸 |\n| SafeTensors             | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | ✗ | 🗸 |\n\n- Safe: Can I use a file randomly downloaded and expect not to run arbitrary code ?\n- Zero-copy: Does reading the file require more memory than the original file ?\n- Lazy loading: Can I inspect the file without loading everything ? And loading only\n  some tensors in it without scanning the whole file (distributed setting) ?\n- Layout control: Lazy loading, is not necessarily enough since if the information about tensors is spread out in your file, then even if the information is lazily accessible you might have to access most of your file to read the available tensors (incurring many DISK -> RAM copies). Controlling the layout to keep fast access to single tensors is important.\n- No file size limit: Is there a limit to the file size ?\n- Flexibility: Can I save custom code in the format and be able to use it later with zero extra code ? (~ means we can store more than pure tensors, but no custom code)\n- Bfloat16\u002FFp8: Does the format support native bfloat16\u002Ffp8 (meaning no weird workarounds are\n  necessary)? This is becoming increasingly important in the ML world.\n\n\n### Main oppositions\n\n- Pickle: Unsafe, runs arbitrary code\n- H5: Apparently now discouraged for TF\u002FKeras. Seems like a great fit otherwise actually. Some classic use after free issues: \u003Chttps:\u002F\u002Fwww.cvedetails.com\u002Fvulnerability-list\u002Fvendor_id-15991\u002Fproduct_id-35054\u002FHdfgroup-Hdf5.html>. On a very different level than pickle security-wise. Also 210k lines of code vs ~400 lines for this lib currently.\n- SavedModel: Tensorflow specific (it contains TF graph information).\n- MsgPack: No layout control to enable lazy loading (important for loading specific parts in distributed setting)\n- Protobuf: Hard 2Go max file size limit\n- Cap'n'proto: Float16 support is not present [link](https:\u002F\u002Fcapnproto.org\u002Flanguage.html#built-in-types) so using a manual wrapper over a byte-buffer would be necessary. Layout control seems possible but not trivial as buffers have limitations [link](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F48458839\u002Fcapnproto-maximum-filesize).\n- Numpy (npz): No `bfloat16` support. Vulnerable to zip bombs (DOS). Not zero-copy.\n- Arrow: No `bfloat16` support.\n\n### Notes\n\n- Zero-copy: No format is really zero-copy in ML, it needs to go from disk to RAM\u002FGPU RAM (that takes time). On CPU, if the file is already in cache, then it can\n  truly be zero-copy, whereas on GPU there is not such disk cache, so a copy is always required\n  but you can bypass allocating all the tensors on CPU at any given point.\n  SafeTensors is not zero-copy for the header. The choice of JSON is pretty arbitrary, but since deserialization is \u003C\u003C\u003C of the time required to load the actual tensor data and is readable I went that way, (also space is \u003C\u003C\u003C to the tensor data).\n\n- Endianness: Little-endian. This can be modified later, but it feels really unnecessary at the\n  moment.\n- Order: 'C' or row-major. This seems to have won. We can add that information later if needed.\n- Stride: No striding, all tensors need to be packed before being serialized. I have yet to see a case where it seems useful to have a strided tensor stored in serialized format.\n - Sub 1 bytes dtypes: Dtypes can now have lower than 1 byte size, this makes alignment&adressing tricky. For now, the library will simply error out whenever an operation triggers an non aligned read. Trickier API may be created later for those non standard ops. \n\n### Benefits\n\nSince we can invent a new format we can propose additional benefits:\n\n- Prevent DOS attacks: We can craft the format in such a way that it's almost\n  impossible to use malicious files to DOS attack a user. Currently, there's a limit\n  on the size of the header of 100MB to prevent parsing extremely large JSON.\n  Also when reading the file, there's a guarantee that addresses in the file\n  do not overlap in any way, meaning when you're loading a file you should never\n  exceed the size of the file in memory\n\n- Faster load: PyTorch seems to be the fastest file to load out in the major\n  ML formats. However, it does seem to have an extra copy on CPU, which we\n  can bypass in this lib by using `torch.UntypedStorage.from_file`.\n  Currently, CPU loading times are extremely fast with this lib compared to pickle.\n  GPU loading times are as fast or faster than PyTorch equivalent.\n  Loading first on CPU with memmapping with torch, and then moving all tensors to GPU seems\n  to be faster too somehow (similar behavior in torch pickle)\n\n- Lazy loading: in distributed (multi-node or multi-gpu) settings, it's nice to be able to\n  load only part of the tensors on the various models. For\n  [BLOOM](https:\u002F\u002Fhuggingface.co\u002Fbigscience\u002Fbloom) using this format enabled\n  to load the model on 8 GPUs from 10mn with regular PyTorch weights down to 45s.\n  This really speeds up feedbacks loops when developing on the model. For instance\n  you don't have to have separate copies of the weights when changing the distribution\n  strategy (for instance Pipeline Parallelism vs Tensor Parallelism).\n\nLicense: Apache-2.0\n","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsafetensors\u002Fassets\u002Fraw\u002Fmain\u002Fbanner-dark.svg\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsafetensors\u002Fassets\u002Fraw\u002Fmain\u002Fbanner-light.svg\">\n    \u003Cimg alt=\"Hugging Face Safetensors Library\" src=\"https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fsafetensors\u002Fassets\u002Fraw\u002Fmain\u002Fbanner-light.svg\" style=\"max-width: 100%;\">\n  \u003C\u002Fpicture>\n  \u003Cbr\u002F>\n  \u003Cbr\u002F>\n\u003C\u002Fp>\n\nPython\n[![Pypi](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fsafetensors.svg)](https:\u002F\u002Fpypi.org\u002Fpypi\u002Fsafetensors\u002F)\n[![Documentation](https:\u002F\u002Fimg.shields.io\u002Fwebsite\u002Fhttp\u002Fhuggingface.co\u002Fdocs\u002Fsafetensors\u002Findex.svg?label=docs)](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fsafetensors\u002Findex)\n[![Codecov](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fhuggingface\u002Fsafetensors\u002Fcoverage.svg?branch=main)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fsafetensors)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_safetensors_readme_23193c8ce2ee.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fsafetensors)\n\nRust\n[![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fsafetensors.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fsafetensors)\n[![Documentation](https:\u002F\u002Fdocs.rs\u002Fsafetensors\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Fsafetensors\u002F)\n[![Codecov](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fhuggingface\u002Fsafetensors\u002Fcoverage.svg?branch=main)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fhuggingface\u002Fsafetensors)\n[![Dependency status](https:\u002F\u002Fdeps.rs\u002Frepo\u002Fgithub\u002Fhuggingface\u002Fsafetensors\u002Fstatus.svg?path=safetensors)](https:\u002F\u002Fdeps.rs\u002Frepo\u002Fgithub\u002Fhuggingface\u002Fsafetensors?path=safetensors)\n\n# safetensors\n\n## Safetensors\n\n本仓库实现了一种新的简单格式，用于安全地存储张量（与 pickle 不同），同时保持高效（零拷贝）。\n\n### 安装\n#### Pip\n\n您可以通过 pip 包管理器安装 safetensors：\n\n```bash\npip install safetensors\n```\n\n#### 从源码安装\n\n要从源码编译，您需要 Rust 环境：\n\n```bash\n# 安装 Rust\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\n# 确保 Rust 已更新并使用稳定版\nrustup update\ngit clone https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\ncd safetensors\u002Fbindings\u002Fpython\npip install setuptools_rust\npip install -e .\n```\n\n### 快速入门\n\n```python\nimport torch\nfrom safetensors import safe_open\nfrom safetensors.torch import save_file\n\ntensors = {\n   \"weight1\": torch.zeros((1024, 1024)),\n   \"weight2\": torch.zeros((1024, 1024))\n}\nsave_file(tensors, \"model.safetensors\")\n\ntensors = {}\nwith safe_open(\"model.safetensors\", framework=\"pt\", device=\"cpu\") as f:\n   for key in f.keys():\n       tensors[key] = f.get_tensor(key)\n```\n\n[Python 文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fsafetensors\u002Findex)\n\n\n### 格式说明\n\n- 8 字节：`N`，一个无符号小端序 64 位整数，表示头部的大小。\n- N 字节：一个 JSON UTF-8 字符串，代表头部数据。\n  - 头部数据必须以 `{` 字符（0x7B）开头。\n  - 头部数据可以末尾填充空白字符（0x20）。\n  - 头部是一个字典，形如 `{\"TENSOR_NAME\": {\"dtype\": \"F16\", \"shape\": [1, 16, 256], \"data_offsets\": [BEGIN, END]}, \"NEXT_TENSOR_NAME\": {...}, ...}`，\n    - `data_offsets` 指向张量数据相对于字节缓冲区起始位置的偏移量（不是文件中的绝对位置），\n      其中 `BEGIN` 是起始偏移量，`END` 是结束偏移量的下一个位置（因此张量的总字节数为 `END - BEGIN`）。\n  - 允许使用特殊键 `__metadata__` 来存储自由格式的字符串到字符串映射。不允许使用任意 JSON 数据，所有值必须是字符串。\n- 文件剩余部分：字节缓冲区。\n\n注意事项：\n - 不允许重复键。并非所有解析器都会遵守此规则。\n - 通常情况下，JSON 的子集由该库的 `serde_json` 库隐式决定。任何不常见的用法，例如整数的特殊表示、换行符和 UTF-8 字符串中的转义序列，都可能在后续版本中被修改，以确保安全性。\n - 张量值不会被检查，特别是文件中可能包含 NaN 和 +\u002F-Inf。\n - 允许空张量（其中一个维度为 0 的张量）。它们在数据缓冲区中不存储任何数据，但在头部保留其尺寸信息。虽然这些张量本身没有太多实际意义，但从传统张量库（PyTorch、TensorFlow、NumPy 等）的角度来看，它们仍然是合法的张量。\n - 允许 0 阶张量（形状为 `[]` 的张量），它们实际上就是一个标量。\n - 字节缓冲区必须完全索引，不能有空洞。这可以防止创建多态文件。\n - 字节顺序：小端序。\n - 存储顺序：C 语言顺序或行优先。\n - 注意事项：出现了一些小于 1 字节的数据类型，这使得对齐变得复杂。对于这些数据类型，可能需要非传统的 API。\n\n\n### 又一种格式？\n\n本库的主要目的是消除在 PyTorch 中默认使用 `pickle` 的需求。目前已有许多其他机器学习格式以及更通用的文件格式。\n\n让我们来看看一些替代方案，以及为什么这种格式被认为具有吸引力。以下是我个人的观点，可能带有一定的主观性：\n\n| 格式                  | 安全性 | 零拷贝 | 延迟加载 | 无文件大小限制 | 布局控制 | 灵活性 | Bfloat16\u002FFp8 |\n| ----------------------- | --- | --- | --- | --- | --- | --- | --- |\n| pickle (PyTorch)        | ✗ | ✗ | ✗ | 🗸 | ✗ | 🗸 | 🗸 |\n| H5 (Tensorflow)         | 🗸 | ✗ | 🗸 | 🗸 | ~ | ~ | ✗ |\n| SavedModel (Tensorflow) | 🗸 | ✗ | ✗ | 🗸 | 🗸 | ✗ | 🗸 |\n| MsgPack (flax)          | 🗸 | 🗸 | ✗ | 🗸 | ✗ | ✗ | 🗸 |\n| Protobuf (ONNX)         | 🗸 | ✗ | ✗ | ✗ | ✗ | ✗ | 🗸 |\n| Cap'n'Proto             | 🗸 | 🗸 | ~ | 🗸 | 🗸 | ~ | ✗ |\n| Arrow                   | ? | ? | ? | ? | ? | ? | ✗ |\n| Numpy (npy,npz)         | 🗸 | ? | ? | ✗ | 🗸 | ✗ | ✗ |\n| pdparams (Paddle)       | ✗ | ✗ | ✗ | 🗸 | ✗ | 🗸 | 🗸 |\n| SafeTensors             | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | ✗ | 🗸 |\n\n- 安全性：我能否使用随机下载的文件，并确信不会执行任意代码？\n- 零拷贝：读取文件是否需要比原始文件更多的内存？\n- 延迟加载：我能否在不加载整个文件的情况下查看文件内容？并且只加载文件中的部分张量，而无需扫描整个文件（适用于分布式场景）？\n- 布局控制：仅仅支持延迟加载并不足够，因为如果张量的信息分散在文件中，即使信息可以延迟访问，你也可能需要访问文件的大部分内容才能读取可用的张量（从而导致大量的磁盘到内存复制操作）。因此，控制布局以实现对单个张量的快速访问非常重要。\n- 无文件大小限制：文件大小是否有上限？\n- 灵活性：我能否将自定义代码保存到该格式中，并在以后无需额外代码即可使用它？（“~”表示可以存储除纯张量之外的内容，但不能存储自定义代码）\n- Bfloat16\u002FFp8：该格式是否原生支持 Bfloat16\u002FFp8 数据类型（即不需要任何奇怪的变通方法）？这一点在机器学习领域越来越重要。\n\n### 主要竞争对手\n\n- Pickle：不安全，会执行任意代码\n- H5：据称现在已不推荐用于 TensorFlow\u002FKeras。不过从其他方面来看，它其实非常合适。存在一些经典的“使用后释放”问题：[链接](https:\u002F\u002Fwww.cvedetails.com\u002Fvulnerability-list\u002Fvendor_id-15991\u002Fproduct_id-35054\u002FHdfgroup-Hdf5.html)。在安全性上与 pickle 完全不在一个级别。此外，HDF5 有 21 万行代码，而该库目前只有约 400 行。\n- SavedModel：TensorFlow 特定格式（包含 TF 图信息）。\n- MsgPack：无法控制数据布局，因此无法实现延迟加载（这在分布式场景中加载特定部分时非常重要）。\n- Protobuf：有严格的文件大小上限。\n- Cap’n’proto：不支持 float16 数据类型 [链接](https:\u002F\u002Fcapnproto.org\u002Flanguage.html#built-in-types)，因此需要手动封装字节缓冲区。虽然理论上可以控制数据布局，但并不容易，因为缓冲区本身存在限制 [链接](https:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F48458839\u002Fcapnproto-maximum-filesize)。\n- Numpy (npz)：不支持 bfloat16 数据类型。易受 zip 恶意攻击（拒绝服务攻击）。非零拷贝。\n- Arrow：不支持 bfloat16 数据类型。\n\n### 备注\n\n- 零拷贝：在机器学习领域，没有任何一种格式是真正意义上的零拷贝。数据总是需要从磁盘传输到内存或 GPU 内存中（这个过程需要时间）。在 CPU 上，如果文件已经缓存在高速缓存中，则可以实现真正的零拷贝；而在 GPU 上则没有类似的磁盘缓存机制，因此无论如何都需要进行一次拷贝，不过可以在任何时候避免将所有张量先分配到 CPU 上。SafeTensors 在处理头部时并非零拷贝。选择 JSON 格式其实比较随意，但由于反序列化所消耗的时间远远小于加载实际张量数据所需的时间，且 JSON 格式可读性强，所以选择了这种方式；另外，JSON 头部占用的空间也远小于张量数据本身。\n  \n- 字节序：小端序。未来可以修改，但目前看来并无必要。\n- 存储顺序：C 语言风格的行优先顺序。这一选择似乎已经确定下来，如有需要，后续还可以添加相关信息。\n- 步幅：不支持步幅操作，所有张量在序列化前都需要被完全打包。目前尚未遇到过在序列化格式中存储带步幅张量的实际需求。\n- 小于 1 字节的数据类型：如今数据类型可以小于 1 字节，这使得对齐和寻址变得复杂。现阶段，当操作触发未对齐的读取时，库会直接报错。未来可能会为这些非标准操作设计更复杂的 API。\n\n### 优势\n\n由于我们可以自定义一种新的格式，因此可以提出以下额外优势：\n\n- 防止 DOS 攻击：我们可以通过精心设计格式，几乎杜绝利用恶意文件发起 DOS 攻击的可能性。目前，为了防止解析超大 JSON 文件，头部大小被限制在 100MB 以内。此外，在读取文件时，保证文件中的地址不会有任何重叠，这意味着在加载文件时，内存占用永远不会超过文件本身的大小。\n  \n- 加载速度更快：在主流的机器学习文件格式中，PyTorch 的加载速度似乎最快。然而，PyTorch 在 CPU 上仍会进行一次额外的拷贝操作，而本库可以通过 `torch.UntypedStorage.from_file` 来避免这一拷贝。目前，使用本库在 CPU 上加载的速度比 pickle 快得多；而在 GPU 上，加载速度则与 PyTorch 相当甚至更快。先用 torch 的内存映射功能在 CPU 上加载数据，然后再将所有张量移动到 GPU 上，这种方法似乎也能进一步提升加载速度（与 PyTorch 的 pickle 格式表现类似）。\n  \n- 延迟加载：在分布式（多节点或多 GPU）环境中，能够只加载各个模型所需的部分张量是非常有用的。例如，对于 [BLOOM](https:\u002F\u002Fhuggingface.co\u002Fbigscience\u002Fbloom) 模型，使用这种格式后，原本需要用常规 PyTorch 权重在 8 张 GPU 上加载 10 分钟的流程，现在只需 45 秒即可完成。这大大加快了模型开发过程中的反馈循环。比如，在调整分布式策略（如流水线并行与张量并行之间切换）时，无需再为每种策略单独保存一份权重副本。\n\n许可证：Apache-2.0","# Safetensors 快速上手指南\n\nSafetensors 是一种用于安全、快速存储张量（Tensor）的新格式，旨在替代存在安全风险的 Pickle 格式，同时支持零拷贝（zero-copy）和懒加载。\n\n## 环境准备\n\n*   **系统要求**：支持 Linux, macOS, Windows。\n*   **前置依赖**：\n    *   Python 环境。\n    *   （仅源码安装需要）Rust 工具链。\n\n## 安装步骤\n\n推荐使用 pip 进行安装，简单且稳定。\n\n### 方式一：通过 Pip 安装（推荐）\n\n```bash\npip install safetensors\n```\n\n> **提示**：国内用户若下载缓慢，可使用清华源或阿里源加速：\n> `pip install safetensors -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 方式二：从源码安装\n\n如果你需要最新特性或参与开发，需先安装 Rust。\n\n```bash\n# 1. 安装 Rust\ncurl --proto '=https' --tlsv1.2 -sSf https:\u002F\u002Fsh.rustup.rs | sh\n# 确保 Rust 更新至稳定版\nrustup update\n\n# 2. 克隆仓库并安装\ngit clone https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\ncd safetensors\u002Fbindings\u002Fpython\npip install setuptools_rust\npip install -e .\n```\n\n## 基本使用\n\n以下示例展示如何使用 PyTorch 保存和加载 `.safetensors` 文件。\n\n```python\nimport torch\nfrom safetensors import safe_open\nfrom safetensors.torch import save_file\n\n# 1. 创建示例张量数据\ntensors = {\n   \"weight1\": torch.zeros((1024, 1024)),\n   \"weight2\": torch.zeros((1024, 1024))\n}\n\n# 2. 保存为 safetensors 文件\nsave_file(tensors, \"model.safetensors\")\n\n# 3. 加载文件\ntensors = {}\n# framework=\"pt\" 表示加载为 PyTorch 张量, device=\"cpu\" 指定设备\nwith safe_open(\"model.safetensors\", framework=\"pt\", device=\"cpu\") as f:\n   for key in f.keys():\n       tensors[key] = f.get_tensor(key)\n\n# 此时 tensors 字典中已包含加载后的张量\nprint(tensors[\"weight1\"].shape)\n```\n\n**核心优势说明：**\n*   **安全性**：不包含可执行代码，避免恶意 pickle 文件攻击。\n*   **高性能**：支持内存映射（mmap），实现零拷贝加载，显著减少 CPU\u002FGPU 内存占用并提升加载速度。\n*   **懒加载**：可以只读取文件中特定的张量，无需加载整个模型，特别适合分布式训练场景。","某 AI 初创团队正在开发一款基于 Stable Diffusion 的图像生成服务，需要频繁在内部服务器与公有云之间同步高达数 GB 的大模型权重文件，并支持多语言后端调用。\n\n### 没有 safetensors 时\n- **严重的安全隐患**：传统 PyTorch 模型通常使用 pickle 格式存储，加载时会自动执行任意代码。团队成员每次从外部社区下载微调模型时，都担心隐含恶意脚本，必须先在隔离沙箱中人工审查，流程繁琐且心理负担重。\n- **加载速度缓慢**：pickle 是单线程串行加载，面对数十亿参数的模型，启动服务时需要漫长的等待时间，严重影响开发调试效率和线上服务的冷启动速度。\n- **跨框架兼容性差**：后端部分模块尝试使用 Rust 或 C++ 进行性能优化，但无法直接读取 Python 特有的 pickle 格式，导致团队必须维护额外的转换脚本，增加了工程复杂度。\n- **元数据管理混乱**：模型的版本信息、训练参数等元数据往往分散在不同文件中，容易丢失或与权重文件不匹配，导致复现实验结果困难。\n\n### 使用 safetensors 后\n- **本质上的安全保障**：safetensors 仅存储张量数据，完全摒弃了代码执行机制。团队现在可以放心地直接从 Hugging Face Hub 下载社区模型，无需担心远程代码执行攻击，彻底消除了安全顾虑。\n- **极速零拷贝加载**：得益于内存映射（mmap）技术，safetensors 实现了零拷贝加载。模型加载速度提升了数倍，几乎瞬间完成，显著缩短了服务重启时间和迭代周期。\n- **无缝的多语言支持**：由于格式简单且标准统一，Rust 和 C++ 后端可以直接解析同一份模型文件，无需任何转换层。团队顺利实现了高性能推理引擎的混合架构部署。\n- **内置结构化元数据**：safetensors 允许在文件头中以 JSON 格式嵌入标准化的元数据。训练超参数和版本信息随模型文件一起分发，确保了实验的可追溯性和复现性。\n\nsafetensors 通过提供一种既安全又高效的标准化存储方案，解决了大模型时代权重分发与加载的核心痛点，成为现代 AI 工程化落地的基础设施首选。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_safetensors_6e018fa2.png","huggingface","Hugging Face","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fhuggingface_90da21a4.png","The AI community building the future.",null,"https:\u002F\u002Fhuggingface.co\u002F","https:\u002F\u002Fgithub.com\u002Fhuggingface",[84,88,92,96],{"name":85,"color":86,"percentage":87},"Python","#3572A5",51.2,{"name":89,"color":90,"percentage":91},"Rust","#dea584",48.1,{"name":93,"color":94,"percentage":95},"Makefile","#427819",0.4,{"name":97,"color":98,"percentage":99},"Nix","#7e7eff",0.3,3672,303,"2026-04-02T13:10:20","Apache-2.0",1,"Linux, macOS, Windows","未说明",{"notes":108,"python":106,"dependencies":109},"该工具是一个用于安全存储张量的文件格式库，旨在替代不安全的 pickle。若从源码安装 Python 绑定，需要安装 Rust 环境。支持零拷贝（zero-copy）和懒加载（lazy loading），能有效防止 DOS 攻击并加速模型加载。虽然示例中使用了 PyTorch，但该库本身主要提供格式规范及基础读写能力，具体深度学习框架的支持取决于相应的绑定实现。",[110],"setuptools_rust",[13],"2026-03-27T02:49:30.150509","2026-04-06T10:25:36.038462",[115,120,125,130,135,140],{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},11552,"安装 safetensors 时出现 \"Cargo, the Rust package manager, is not installed\" 错误怎么办？","该错误表明系统未安装 Rust 和 Cargo，或者它们不在系统 PATH 环境变量中。safetensors 需要 Rust 工具链来编译扩展。\n\n解决方法：\n1. 访问 https:\u002F\u002Frustup.rs\u002F 下载并安装 Rust。\n2. 或者通过系统的包管理器安装 Rust。\n3. 安装完成后，确保重启终端或重新加载环境变量，然后再次尝试 pip install。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fissues\u002F314",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},11553,"在 MacBook M1 (Apple Silicon) 上无法安装 safetensors 怎么办？","如果在 M1 Mac 上遇到安装问题，可以尝试安装特定的修补版本。维护者建议尝试以下命令：\n\npip install safetensors==0.3.3.post1\n\n注意：该版本可能已被撤回（yanked），但它证明了在缺失的平台构建上是可行的。如果仍有问题，请关注后续关于迁移到 maturin 构建系统的更新以解决构建缓慢或失败的问题。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fissues\u002F330",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},11554,"保存模型时报错 \"Some tensors share memory...\" 该如何解决？","当模型中存在共享内存的张量（例如设置了 tie_word_embeddings=True，导致 lm_head.weight 和 word_embedding.weight 共享缓冲区）时，safetensors 会抛出 RuntimeError。\n\n解决方法：\n在保存之前，对共享的张量使用 .clone() 方法。例如：\ntensor.clone()\n\n这将创建张量的副本，解除内存共享状态。虽然这会暂时增加内存消耗，但能确保成功保存且避免加载时的潜在差异。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fissues\u002F202",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},11555,"从 PyTorch checkpoint (.ckpt) 转换到 safetensors 后加载报错 \"shape is invalid for input of size\" 怎么办？","这通常是由于 Windows 平台上的数据类型溢出问题导致的（在旧版本中常见）。\n\n解决方法：\n1. 升级 safetensors 到 0.2.5 或更高版本，该问题已在后续版本中修复。\n2. 在转换代码中，确保正确处理共享指针并使张量连续：\n   - 使用 shared_pointers 检测并移除重复的共享权重。\n   - 对剩余张量执行 .contiguous() 操作：loaded = {k: v.contiguous() for k, v in loaded.items()}\n   - 然后调用 save_file 保存。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fissues\u002F95",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},11556,"如何像 torch.load 一样从字节流（buffer）加载 safetensors 并指定设备（device）？","safetensors.torch.load_file 仅接受文件路径，而 safetensors.torch.load 接受字节数据但早期版本不支持直接指定 device 参数，导致大模型加载时容易OOM。\n\n建议方案：\n1. 如果使用的是较新版本，检查是否已支持在 load 函数中传递 device 参数。\n2. 如果必须从流加载且需控制设备，目前的变通方法是先加载到 CPU，然后再移动到目标设备（但这可能无法完全解决 OOM 问题）。\n3. 最佳实践是直接使用 load_file 指向磁盘文件，让库内部处理内存映射，这样效率最高且节省内存。如果需要进度条，可以考虑在文件下载阶段显示进度，而不是在加载阶段。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fissues\u002F200",{"id":141,"question_zh":142,"answer_zh":143,"source_url":134},11557,"Windows 平台上加载 safetensors 出现形状错误或数据损坏的原因是什么？","在旧版本中，Windows 平台上的 c_long 类型为 i32，而在其他平台可能是 i64。这导致在计算张量切片时发生整数溢出，从而读取了错误的数据片段。\n\n解决方法：\n请务必将 safetensors 升级到 0.2.5 或更高版本。维护者已针对 Windows 平台的类型定义进行了修复，解决了因 PyO3 绑定导致的切片溢出问题。",[145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240],{"id":146,"version":147,"summary_zh":148,"released_at":149},62064,"v0.7.0","## 新增功能\n\n### `complex64` 支持\n\n此版本新增了对存储 `complex64` 张量的支持。\n\n## 变更内容\n* 撤销 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F647 中提交的“当键不匹配时提前退出（更快）”更改。\n* @zeroRains 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F630 中支持在 `safe_open` 中使用 PaddlePaddle。\n* @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F648 中修复了 Clippy 静态分析警告。\n* @changeyoung98 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F646 中实现了无需转换为 NumPy 即可直接使用 PaddlePaddle 进行保存和加载的功能。\n* @antimora 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F651 中修复了 `no-std` 特性的配置，使其能够在标准库不可用时自动回退到分配器。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F654 中修复了大端模式（S390X）下的测试问题。\n* @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F655 中修复了 `get_slice` 方法。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F658 中将 `hashbrown` 依赖更新至 0.16 版本。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F667 中修复了文档构建问题。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F666 中将 `packaging` 添加为 `torch` 特性的依赖项。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F660 中增加了对 `complex64` 数据类型的支持。\n* @McPatate 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F669 中实现了序列化时的头部大小检查功能。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F670 中将版本号设置为 0.7.0-dev.0。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F673 中修复了发布流程中的 CI 问题。\n\n## 新贡献者\n* @zeroRains 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F630 中做出了首次贡献。\n* @changeyoung98 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F646 中做出了首次贡献。\n* @antimora 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F651 中做出了首次贡献。\n* @danieldk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F654 中做出了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.6.2...v0.7.0","2025-11-19T15:58:57",{"id":151,"version":152,"summary_zh":153,"released_at":154},62065,"v0.6.2","## 变更内容\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F644 中修复了 1.89 版本中的 clippy 警告\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F643 中修复了 torch 中对 uint 支持的版本检查问题\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.6.1...v0.6.2","2025-08-08T13:10:41",{"id":156,"version":157,"summary_zh":158,"released_at":159},62066,"v0.6.1","## 变更内容\n* Rust 版本升级（缓存 v1 已弃用）。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F627 中完成。\n* 重新添加对 u16、u32、u64 的支持。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F629 中完成。\n* 添加 _safe_open_handle。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F608 中完成。\n* 修复 0.6.0 版本的 test_simple.py 脚本。由 @xanderlent 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F634 中完成。\n* 再次更新 GitHub Actions 配置。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F635 中完成。\n* 准备 6.0.1 补丁版本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F638 中完成。\n\n## 新贡献者\n* @xanderlent 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F634 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.6.0...v0.6.1","2025-08-06T09:36:31",{"id":161,"version":162,"summary_zh":163,"released_at":164},62067,"v0.6.1-rc0","## 变更内容\n* Rust 版本升级（缓存 v1 已弃用）。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F627 中完成\n* 重新添加对 u16、u32、u64 的支持。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F629 中完成\n* 添加 _safe_open_handle。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F608 中完成\n* 修复 0.6.0 版本的 test_simple.py 脚本。由 @xanderlent 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F634 中完成\n* 再次更新 GitHub Actions 配置。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F635 中完成\n* 准备 6.0.1 补丁版本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F638 中完成\n\n## 新贡献者\n* @xanderlent 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F634 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.6.0...v0.6.1-rc0","2025-08-06T09:14:13",{"id":166,"version":167,"summary_zh":168,"released_at":169},62068,"v0.6.0","## 最大的变化\n\n* 添加了对 FP4\u002FFP6 的支持 https:\u002F\u002Fwww.opencompute.org\u002Fdocuments\u002Focp-microscaling-formats-mx-v1-0-spec-final-pdf\n  目前大多数深度学习框架对这一格式的支持还处于起步阶段（需要尚未发布的 PyTorch 2.8 版本，而且该版本对 FP4 的支持也存在一些限制）。然而，由于 FP4\u002FFP6 是由硬件厂商支持的开放规范，未来很可能会得到硬件层面的支持，因此将其纳入 safetensors 格式中是合理的选择，而不是在各个框架中各自维护一套自定义的量化格式。\n\n  FP4\u002FFP6 的含义是：张量中的每个元素可能不再以字节对齐的方式存储或访问。例如，如果存储一个 FP4 值，那么该字节中会有 4 位超出规范范围。目前，safetensors 库会在任何导致字节内出现未使用或未对齐位的操作时，直接抛出 `MisalignedByte` 异常。考虑到大多数张量的尺寸通常是 2 的幂次方，这种情况在实际应用中不太可能出现。通过立即抛出异常，我们为将来实现与张量库一致的行为留出了灵活性。\n\n  因此，`Dtype.size()` 方法已被弃用，因为它返回的是数据类型在 *字节* 中的大小。现在我们更推荐使用 `bitsize()` 方法，用户需要自行处理类似 `len * bitsize() \u002F 8` 的计算，并确保除法结果是整数。\n\n  顺便提一下，对于 PyTorch 用户而言，PyTorch 并没有真正实现 FP4 数据类型，而是提供了一种名为 `float4_e2m1fn_x2` 的数据类型，它实际上表示两个 FP4 值。这就是为什么 PyTorch 目前不会遇到对齐问题的原因（但无法实现 FP6）。这也意味着，形状为 [2, 2] 的 float4 张量实际上包含 8 个值。safetensors 库会默默地将形状为 `[x, y, ...z]` 的张量转换为 `[x, y, ..., z\u002F2]`，利用最后一个维度来“吞下”类型中包含的 `x2` 信息。不过，目前尚无明确的行为规范，因此这一实现可能会在未来发生变化。\n\n## 已更改的内容\n* 在 @rachthree 的贡献下，将 safestructures 添加到特色项目列表中：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F570\n* 由 @Narsil 修复基准测试：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F580\n* `load_file`：按张量偏移量顺序加载张量，由 @yousong 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F571\n* 更新 Python 基准测试？由 @Narsil 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F587\n* 修复 `benchmark.rs` 中的拼写错误：“serialize” 和 “deserialize”，由 @Marco-Christiani 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F585\n* 在文档中将 onnx-safetensors 添加到项目列表中，由 @justinchuby 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F581\n* 在 `get_tensor` 函数中将设备传递给 `torch.asarray`，由 @mickvangelderen 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F588\n* 将 py311 设置为默认版本，由 @Narsil 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F589\n* 修复测试，由 @Narsil 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F590\n* 修复测试，由 @Narsil 完成：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetenso","2025-06-23T07:47:37",{"id":171,"version":172,"summary_zh":173,"released_at":174},62069,"v0.6.0-rc1","## 变更内容\n* 在精选项目中添加 safetensors，由 @rachthree 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F570 中完成。\n* 修复基准测试。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F580 中完成。\n* load_file：按张量偏移量顺序加载张量，由 @yousong 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F571 中完成。\n* 更新 Python 基准测试？由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F587 中完成。\n* 修复 (benchmark.rs)：“serialize”和“deserialize”的拼写错误，由 @Marco-Christiani 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F585 中完成。\n* 在文档中的项目列表中添加 onnx-safetensors，由 @justinchuby 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F581 中完成。\n* 将设备传递给 get_tensor 中的 torch.asarray，由 @mickvangelderen 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F588 中完成。\n* 将 py311 设置为默认版本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F589 中完成。\n* 修复测试，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F590 中完成。\n* 修复测试，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F591 中完成。\n* [进行中] 启用无警告的自由线程 Python + pyo3 0.24，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F592 中完成。\n* 修复基准测试动作？由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F603 中完成。\n* 修复 serialize_file 文档字符串中的拼写错误，由 @LVivona 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F594 中完成。\n* 删除无用代码，由 @cyc4188 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F597 中完成。\n* 当键不匹配时提前退出（更快）。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F602 中完成。\n* 修复 ml_dtypes 可能缺失的问题。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F605 中完成。\n* 将许可证添加到 wheels 包中。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F606 中完成。\n* 添加元数据的公共 API。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F618 中完成。\n* 更新依赖项，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F614 中完成。\n* 通过改进 `Display` 和 `Error` 的实现来提供更好的错误处理，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F616 中完成。\n* 不再强制在公共 API 中使用 `&Option\u003CT>`；改为使用 `Option\u003C&T>`，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F617 中完成。\n* 添加对 MXFP4、6 的支持。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F611 中完成。\n* 因破坏性变更而升级版本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F619 中完成。\n* 将 data_len 作为元数据的公共 API（用于获取大小），由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F620 中完成。\n* 简化代码并使其更加健壮，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F615 中完成。\n* 重命名。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F621 中完成。\n* 调整为 PyObject 格式。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F622 中完成。\n\n## 新贡献者\n* @rachthree 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fs 中做出了他们的首次贡献。","2025-06-16T13:27:21",{"id":176,"version":177,"summary_zh":178,"released_at":179},62070,"v0.6.0-rc0","## 变更内容\n* 在“特色项目”中添加 safetensors，由 @rachthree 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F570 中完成\n* 修复基准测试。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F580 中完成\n* load_file：按张量偏移量顺序加载张量，由 @yousong 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F571 中完成\n* 更新 Python 基准测试？由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F587 中完成\n* 修复 (benchmark.rs)：“serialize”和“deserialize”的拼写错误，由 @Marco-Christiani 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F585 中完成\n* 在文档的项目列表中添加 onnx-safetensors，由 @justinchuby 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F581 中完成\n* 将设备传递给 get_tensor 中的 torch.asarray，由 @mickvangelderen 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F588 中完成\n* 将 py311 设置为默认版本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F589 中完成\n* 修复测试，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F590 中完成\n* 修复测试，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F591 中完成\n* [进行中] 启用无警告的自由线程 Python + pyo3 0.24，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F592 中完成\n* 修复基准测试动作？由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F603 中完成\n* 修复 serialize_file 文档字符串中的拼写错误，由 @LVivona 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F594 中完成\n* 删除无用代码，由 @cyc4188 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F597 中完成\n* 当键不匹配时提前退出（更快）。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F602 中完成\n* 修复 ml_dtypes 可能缺失的问题。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F605 中完成\n* 将许可证添加到 wheels 包中。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F606 中完成\n* 添加元数据的公共 API。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F618 中完成\n* 更新依赖项，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F614 中完成\n* 通过改进 `Display` 和 `Error` 的实现，提供更好的错误处理，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F616 中完成\n* 不再强制要求公共 API 中使用 `&Option\u003CT>`；改为使用 `Option\u003C&T>`，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F617 中完成\n* 添加对 MXFP4、6 的支持。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F611 中完成\n* 因破坏性变更而升级版本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F619 中完成\n* 将 data_len 作为元数据的公共 API（用于获取大小），由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F620 中完成\n* 简化代码并使其更加健壮，由 @H2CO3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F615 中完成\n* 重命名。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F621 中完成\n\n## 新贡献者\n* @rachthree 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F570 中完成了首次贡献\n* @yousong 在 https:\u002F\u002Fgithub.com\u002Fhuggin","2025-06-16T06:35:00",{"id":181,"version":182,"summary_zh":183,"released_at":184},62071,"v0.5.3","## 变更内容\n* 更新开发版本号。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F558 中完成。\n* 添加对 Intel Gaudi HPU 加速器的支持。由 @asafkar 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F566 中完成。\n* 恢复与 Rust 1.74 的兼容性。由 @tiran 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F563 中完成。\n* 在索引越界时返回错误。由 @oliness 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F565 中完成。\n* 移除误入的 .DS_Store 文件。由 @spikedoanz 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F573 中完成。\n* 支持 hpu:0。由 @IlyasMoutawwakil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F578 中完成。\n\n## 新贡献者\n* @asafkar 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F566 中完成了首次贡献。\n* @tiran 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F563 中完成了首次贡献。\n* @oliness 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F565 中完成了首次贡献。\n* @spikedoanz 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F573 中完成了首次贡献。\n* @IlyasMoutawwakil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F578 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.5.2...v0.5.3","2025-02-26T09:11:33",{"id":186,"version":187,"summary_zh":188,"released_at":189},62072,"v0.5.2","## 变更内容\n* 由 @ivila 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F556 中添加了对 `no_std` 的支持\n* 由 @SunghwanShim 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F557 中修复了存根文件中 `safe_open.__init__` 的错误签名\n\n## 新贡献者\n* @ivila 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F556 中完成了首次贡献\n* @SunghwanShim 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F557 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.5.1...v0.5.2","2025-01-08T17:39:23",{"id":191,"version":192,"summary_zh":193,"released_at":194},62073,"v0.5.1","修复了类型工具的存根文件。\n\n## 变更内容\n* 升级版本号。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F551 中完成\n* 撤销“升级版本号。（#551）”。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F552 中完成\n* 将内存映射设置为私有纯副本。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F553 中完成\n* 修复存根文件。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F554 中完成\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.5.0...v0.5.1","2025-01-07T10:08:38",{"id":196,"version":197,"summary_zh":198,"released_at":199},62074,"v0.5.0","## Major changes.\r\n\r\n- Using abi3, python 3.8\r\n\r\n\r\n## What's Changed\r\n* Update __init__.pyi by @w1gs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F533\r\n* Trying some new CI. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F539\r\n* Attempt to fix bench + update TF + maturin abi3 CI. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F540\r\n* Add support for Cambricon mlu devices by @huismiling in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F535\r\n* Upgrading PyO3 to 0.23 by @IvanIsCoding in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F543\r\n* Upgrade version number. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F550\r\n\r\n## New Contributors\r\n* @w1gs made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F533\r\n* @huismiling made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F535\r\n* @IvanIsCoding made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F543\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.5...v0.5.0","2025-01-02T16:35:43",{"id":201,"version":202,"summary_zh":203,"released_at":204},62075,"v0.5.0rc0","## What's Changed\r\n* Update __init__.pyi by @w1gs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F533\r\n* Trying some new CI. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F539\r\n* Attempt to fix bench + update TF + maturin abi3 CI. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F540\r\n* Add support for Cambricon mlu devices by @huismiling in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F535\r\n* Upgrading PyO3 to 0.23 by @IvanIsCoding in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F543\r\n* Upgrade version number. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F550\r\n\r\n## New Contributors\r\n* @w1gs made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F533\r\n* @huismiling made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F535\r\n* @IvanIsCoding made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F543\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.5...v0.5.0rc0","2025-01-02T15:38:25",{"id":206,"version":207,"summary_zh":208,"released_at":209},62076,"v0.4.6-rc0","## What's Changed\r\n* Update __init__.pyi by @w1gs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F533\r\n* Trying some new CI. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F539\r\n* Attempt to fix bench + update TF + maturin abi3 CI. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F540\r\n\r\n## New Contributors\r\n* @w1gs made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F533\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.5...v0.4.6-rc0","2024-11-07T07:22:03",{"id":211,"version":212,"summary_zh":213,"released_at":214},62077,"v0.4.5","## What's Changed\r\n* Use id rather than modelId  by @osanseviero in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F517\r\n* fix lifetimes, add tensors iterator by @gvilums in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F518\r\n* Prepare for 0.4.5 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F525\r\n\r\n## New Contributors\r\n* @osanseviero made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F517\r\n* @gvilums made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F518\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.4...v0.4.5","2024-09-05T13:41:07",{"id":216,"version":217,"summary_zh":218,"released_at":219},62078,"v0.4.4","## Important changes\r\n\r\n- Fixed a bug bf16 + big endian + torch   https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F507\r\n- Lots of minor fixes\r\n\r\n## What's Changed\r\n* Fixing empty serialization (no tensor) with some metadata. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F472\r\n* Minor correction about Arrow in README.md by @lhoestq in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F488\r\n* Upgrading Pyo3 0.22 (with gil-refs) by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F504\r\n* Improving the bf16 tests for PT+TF. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F505\r\n* Revert \"Improving the bf16 tests for PT+TF.\" by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F506\r\n* Change doc-builder workflow container by @mishig25 in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F508\r\n* feat(ci): add trufflehog secrets detection by @McPatate in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F484\r\n* Add support for xla devices by @BitPhinix in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F494\r\n* Improving bf16 tests by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F507\r\n* Fixing zero-width tensor for in memory loading. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F510\r\n* Respects torch.device(0) new behavior without breaking backward compatibility by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F509\r\n* Upgrading the version. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F511\r\n* Fixing release workflow. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F513\r\n* Forcing empty list\u002Fempty tuple behavior. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F514\r\n\r\n## New Contributors\r\n* @lhoestq made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F488\r\n* @McPatate made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F484\r\n* @BitPhinix made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F494\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.3...v0.4.4","2024-08-05T12:25:53",{"id":221,"version":222,"summary_zh":223,"released_at":224},62079,"v0.4.4rc0","## What's Changed\r\n* Fixing empty serialization (no tensor) with some metadata. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F472\r\n* Minor correction about Arrow in README.md by @lhoestq in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F488\r\n* Upgrading Pyo3 0.22 (with gil-refs) by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F504\r\n* Improving the bf16 tests for PT+TF. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F505\r\n* Revert \"Improving the bf16 tests for PT+TF.\" by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F506\r\n* Change doc-builder workflow container by @mishig25 in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F508\r\n* feat(ci): add trufflehog secrets detection by @McPatate in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F484\r\n* Add support for xla devices by @BitPhinix in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F494\r\n* Improving bf16 tests by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F507\r\n* Fixing zero-width tensor for in memory loading. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F510\r\n* Respects torch.device(0) new behavior without breaking backward compatibility by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F509\r\n* Upgrading the version. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F511\r\n\r\n## New Contributors\r\n* @lhoestq made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F488\r\n* @McPatate made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F484\r\n* @BitPhinix made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F494\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.3...v0.4.4rc0","2024-08-05T07:39:41",{"id":226,"version":227,"summary_zh":228,"released_at":229},62080,"v0.4.3","## What's Changed\r\n* Updating minor after release 0.4.2 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F433\r\n* Adding support for integer indexing `[0, :2, -1]`. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F440\r\n* Updating doc. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F465\r\n* Add support for `device` in `safetensors.torch.load_model`  by @Wauplin in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F449\r\n* Upgrading pyo3 to 0.21. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F468\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.2...v0.4.3","2024-04-15T15:53:29",{"id":231,"version":232,"summary_zh":233,"released_at":234},62081,"v0.4.3rc0","## What's Changed\r\n* Updating minor after release 0.4.2 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F433\r\n* Adding support for integer indexing `[0, :2, -1]`. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F440\r\n* Updating doc. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F465\r\n* Add support for `device` in `safetensors.torch.load_model`  by @Wauplin in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F449\r\n* Upgrading pyo3 to 0.21. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F468\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fcompare\u002Fv0.4.2...v0.4.3rc0","2024-04-15T10:29:35",{"id":236,"version":237,"summary_zh":238,"released_at":239},62082,"v0.4.2","## What's Changed\r\n* Back on dev. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F313\r\n* Clarify specification around endianness and header padding by @akx in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F306\r\n* Adding new target for m1 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F317\r\n* Fixing macos 13 release script (by prebuilding). by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F315\r\n* Cache dir all the time. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F319\r\n* Supporting whisper conversion. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F320\r\n* add tensorshare to featured projects by @chainyo in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F322\r\n* Fix Bench GH action. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F323\r\n* Yaml is nice. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F325\r\n* Fixing big endian. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F327\r\n* Fixing boolean + numpy > 1.20 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F326\r\n* Add NumPy for all backends dependencies by @chainyo in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F332\r\n* impl `View` for `TensorView` by @coreylowman in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F329\r\n* Reworked the release script entirely by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F334\r\n* Preparing small patch release (Big Endian fix). by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F335\r\n* Temporary revert of the breaking change (keep it for 0.4.0). by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F336\r\n* Don't release rust versions on RC by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F337\r\n* Fixing release script. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F338\r\n* Python 3.8 for arm by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F339\r\n* Win64. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F342\r\n* win64 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F343\r\n* Trying out maturin. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F344\r\n* Reduce memory allocations by @cospectrum in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F350\r\n* [docs] Convert weights by @stevhliu in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F345\r\n* Update types for load_model filename by @kevinhu in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F356\r\n* Fixing release script for windows aarch64 and 3.12 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F348\r\n* Minor docstring edit to flax.py by @paulbricman in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F359\r\n* Stop recreating the hashmap all the time. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F363\r\n* fix: add py.typed by @b-kamphorst in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F365\r\n* Preparing a new release (0.4.0). by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F366\r\n* Supporting bfloat16 for tensorflow + jax (was failing because of intermediary numpy). by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F382\r\n* Fix typo by @cccntu in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F377\r\n* Support fp8_e4m3\u002Ffp8_e5m2 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F383\r\n* Better convert. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F384\r\n* Ignore closed PRs to avoid spam. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F385\r\n* Adding support for Ascend NPU by @statelesshz in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F372\r\n* Fix convert. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F390\r\n* Upgrade dev version. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F392\r\n* Fix\u002Ferrors for some models including Mistral-7b and Flan-ul2 by @lachlancahill in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F388\r\n* Releasing for python 3.12\u002F3.13 and testing on 3.11. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F393\r\n* Adding stale action. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F398\r\n* Document `huggingface_hub.get_safetensors_metadata` by @Wauplin in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F417\r\n* [docs] Update list of projects using safetensors by @mishig25 in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F418\r\n* Adding MLX backend. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F419\r\n* [docs, untested] Attempt to fix links to source by @pcuenca in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F420\r\n* [docs] Use `hfoptions` for metadata by @mishig25 in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F424\r\n* Fix path in version_tag_suffix by @pcuenca in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F426\r\n* Removing old doc. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsafetensors\u002Fpull\u002F427\r\n* Fix missing Apache-2.0 license file in the published crate by @musicinmybrain in https:\u002F\u002Fgithub.c","2024-01-23T09:02:01",{"id":241,"version":242,"summary_zh":238,"released_at":243},62083,"v0.4.2rc0","2024-01-22T19:19:33"]