From 2d2bc993851dedc6fd54ecd899cfa05cb7121e65 Mon Sep 17 00:00:00 2001 From: brian khuu Date: Sun, 21 Apr 2024 11:33:27 +1000 Subject: [PATCH] convert-hf-to-gguf.py: add additional logging --- convert-hf-to-gguf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index ad48f38ce..7ee6a73f2 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -2857,8 +2857,7 @@ class OlmoModel(Model): # map tensor names new_name = tensor_map.get_name(name, try_suffixes=(".weight", ".bias")) if new_name is None: - print(f"Can not map tensor {name!r}") - sys.exit() + raise ValueError(f"Can not map tensor {name!r}") n_dims = len(data.shape) data_dtype = data.dtype @@ -2875,7 +2874,7 @@ class OlmoModel(Model): if self.ftype == 1 and data_dtype == np.float32 and n_dims == 2: data = data.astype(np.float16) - print(f"{new_name}, n_dims = {n_dims}, {old_dtype} --> {data.dtype}") + logger.info(f"{new_name}, n_dims = {n_dims}, {old_dtype} --> {data.dtype}") self.gguf_writer.add_tensor(new_name, data)