From: Julien Chaumond Date: Mon, 31 Oct 2022 11:04:24 +0000 (+0100) Subject: Format "Format" better for GitHub markdown flavor (#43) X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f700a4c687af0e496d8c8c0f7cfc7a87b547894a;p=safetensors.git Format "Format" better for GitHub markdown flavor (#43) * Format "Format" better for GitHub markdown flavor * Format needs to change the rustdoc. Co-authored-by: Nicolas Patry --- diff --git a/README.md b/README.md index edde30a..7a7b2ea 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ safely (as opposed to pickle) and that is still fast (zero-copy). ### Format -8 bytes: `N`, a u64 int, containing the size of the header -N bytes: a JSON utf-8 string representing the header. +- 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. -Rest of the file: byte-buffer. +- Rest of the file: byte-buffer. ### Yet another format ? diff --git a/safetensors/README.md b/safetensors/README.md index edde30a..7a7b2ea 100644 --- a/safetensors/README.md +++ b/safetensors/README.md @@ -7,11 +7,11 @@ safely (as opposed to pickle) and that is still fast (zero-copy). ### Format -8 bytes: `N`, a u64 int, containing the size of the header -N bytes: a JSON utf-8 string representing the header. +- 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. -Rest of the file: byte-buffer. +- Rest of the file: byte-buffer. ### Yet another format ? diff --git a/safetensors/src/lib.rs b/safetensors/src/lib.rs index 0ce6c2d..0d661ee 100644 --- a/safetensors/src/lib.rs +++ b/safetensors/src/lib.rs @@ -6,11 +6,11 @@ //! //!## Format //! -//!8 bytes: `N`, a u64 int, containing the size of the header -//!N bytes: a JSON utf-8 string representing the header. +//! - 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. -//!Rest of the file: byte-buffer. +//! - Rest of the file: byte-buffer. //! //! //!## Yet another format ?