From: Thomas Wang <24695242+thomasw21@users.noreply.github.com> Date: Wed, 14 Dec 2022 10:23:50 +0000 (+0100) Subject: Update README.md (#131) X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=fda385b693ba5710a25b715316a8c3780e4e81b9;p=safetensors.git Update README.md (#131) * Update README.md * Update other files. Co-authored-by: Nicolas Patry --- diff --git a/README.md b/README.md index ccdc4d8..377b5a5 100644 --- 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. diff --git a/safetensors/README.md b/safetensors/README.md index ccdc4d8..377b5a5 100644 --- a/safetensors/README.md +++ b/safetensors/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. diff --git a/safetensors/src/lib.rs b/safetensors/src/lib.rs index 70df796..f6e2ac7 100644 --- a/safetensors/src/lib.rs +++ b/safetensors/src/lib.rs @@ -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. //! //!