diff --git a/bindings/python/py_src/safetensors/numpy.py b/bindings/python/py_src/safetensors/numpy.py index 442270a0..71814afc 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 6b0cbf28..449d5157 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)