]> khamidou — GitHub mirrors - safetensors.git/commitdiff
Update README.md (#131)
authorThomas Wang <24695242+thomasw21@users.noreply.github.com>
Wed, 14 Dec 2022 10:23:50 +0000 (11:23 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Dec 2022 10:23:50 +0000 (11:23 +0100)
* Update README.md

* Update other files.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
README.md
safetensors/README.md
safetensors/src/lib.rs

index ccdc4d8fec4c2e081e64f54fc0405294677ea435..377b5a576ed09df55c395e6586fde513bf81f006 100644 (file)
--- a/README.md
+++ b/README.md
@@ -54,8 +54,8 @@ with safe_open("model.safetensors", framework="pt", device="cpu") as f:
 
 - 8 bytes: `N`, a u64 int, containing the size of the header
 - N bytes: a JSON utf-8 string representing the header.
-        The header is a dict like {"TENSOR_NAME": {"dtype": "float16", "shape": [1, 16, 256], "offsets": (X, Y)}}, where X and Y are the offsets in the byte buffer of the tensor data
-        A special key `__metadata__` is allowed to contain free form text map.
+  - The header is a dict like {"TENSOR_NAME": {"dtype": "float16", "shape": [1, 16, 256], "offsets": (X, Y)}}, where X and Y are the offsets in the byte buffer of the tensor data
+  - A special key `__metadata__` is allowed to contain free form text map.
 - Rest of the file: byte-buffer.
 
 
index ccdc4d8fec4c2e081e64f54fc0405294677ea435..377b5a576ed09df55c395e6586fde513bf81f006 100644 (file)
@@ -54,8 +54,8 @@ with safe_open("model.safetensors", framework="pt", device="cpu") as f:
 
 - 8 bytes: `N`, a u64 int, containing the size of the header
 - N bytes: a JSON utf-8 string representing the header.
-        The header is a dict like {"TENSOR_NAME": {"dtype": "float16", "shape": [1, 16, 256], "offsets": (X, Y)}}, where X and Y are the offsets in the byte buffer of the tensor data
-        A special key `__metadata__` is allowed to contain free form text map.
+  - The header is a dict like {"TENSOR_NAME": {"dtype": "float16", "shape": [1, 16, 256], "offsets": (X, Y)}}, where X and Y are the offsets in the byte buffer of the tensor data
+  - A special key `__metadata__` is allowed to contain free form text map.
 - Rest of the file: byte-buffer.
 
 
index 70df7961bd9a54864e642df65120b7daa7340959..f6e2ac782d59e00abe79fc8a8d11a2fbf9668f2f 100644 (file)
@@ -53,8 +53,8 @@
 //!
 //! - 8 bytes: `N`, a u64 int, containing the size of the header
 //! - N bytes: a JSON utf-8 string representing the header.
-//!         The header is a dict like {"TENSOR_NAME": {"dtype": "float16", "shape": [1, 16, 256], "offsets": (X, Y)}}, where X and Y are the offsets in the byte buffer of the tensor data
-//!         A special key `__metadata__` is allowed to contain free form text map.
+//!   - The header is a dict like {"TENSOR_NAME": {"dtype": "float16", "shape": [1, 16, 256], "offsets": (X, Y)}}, where X and Y are the offsets in the byte buffer of the tensor data
+//!   - A special key `__metadata__` is allowed to contain free form text map.
 //! - Rest of the file: byte-buffer.
 //!
 //!