From 3cf73afac4d5156aac4adfa36acd407f0882a3f9 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 30 Jan 2023 14:00:51 +0100 Subject: [PATCH] Update README.md (#170) Fixes #169 169 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f545dfd..7d7725a 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ necessary)? This is becoming increasingly important in the ML world. ### Notes - Zero-copy: No format is really zero-copy in ML, it needs to go from disk to RAM/GPU RAM (that takes time). Also - In PyTorch/numpy, you need a mutable buffer, and we don't really want to mutate a mmaped file, so 1 copy is really necessary to use the thing freely in user code. That being said, zero-copy is achievable in Rust if it's wanted and safety can be guaranteed by some other means. + In PyTorch/numpy, you need a mutable buffer, and we don't really want to mutate a mmaped file, so 1 copy will be necessary if you modify an array (copy-on-write). That being said, zero-copy is achievable in Rust if it's wanted and safety can be guaranteed by some other means. SafeTensors is not zero-copy for the header. The choice of JSON is pretty arbitrary, but since deserialization is <<< of the time required to load the actual tensor data and is readable I went that way, (also space is <<< to the tensor data). - Endianness: Little-endian. This can be modified later, but it feels really unecessary at the -- 2.43.0