From: Jonathan Chang <31893406+cccntu@users.noreply.github.com> Date: Fri, 17 Nov 2023 13:45:02 +0000 (+0800) Subject: Fix typo (#377) X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=bfd22b312ac56f35cb8cbb129714833b19529844;p=safetensors.git Fix typo (#377) Signed-off-by: Jonathan Chang <31893406+cccntu@users.noreply.github.com> --- diff --git a/bindings/python/py_src/safetensors/numpy.py b/bindings/python/py_src/safetensors/numpy.py index 442270a..71814af 100644 --- a/bindings/python/py_src/safetensors/numpy.py +++ b/bindings/python/py_src/safetensors/numpy.py @@ -70,7 +70,7 @@ def save_file( import numpy as np tensors = {"embedding": np.zeros((512, 1024)), "attention": np.zeros((256, 256))} - save(tensors, "model.safetensors") + save_file(tensors, "model.safetensors") ``` """ flattened = {k: {"dtype": v.dtype.name, "shape": v.shape, "data": _tobytes(v)} for k, v in tensor_dict.items()} diff --git a/bindings/python/py_src/safetensors/tensorflow.py b/bindings/python/py_src/safetensors/tensorflow.py index 6b0cbf2..449d515 100644 --- a/bindings/python/py_src/safetensors/tensorflow.py +++ b/bindings/python/py_src/safetensors/tensorflow.py @@ -64,7 +64,7 @@ def save_file( import tensorflow as tf tensors = {"embedding": tf.zeros((512, 1024)), "attention": tf.zeros((256, 256))} - save(tensors, "model.safetensors") + save_file(tensors, "model.safetensors") ``` """ np_tensors = _tf2np(tensors)