convert-hf-to-gguf.py: add additional logging
This commit is contained in:
parent
58d5a5d2d5
commit
2d2bc99385
1 changed files with 2 additions and 3 deletions
|
@ -2857,8 +2857,7 @@ class OlmoModel(Model):
|
||||||
# map tensor names
|
# map tensor names
|
||||||
new_name = tensor_map.get_name(name, try_suffixes=(".weight", ".bias"))
|
new_name = tensor_map.get_name(name, try_suffixes=(".weight", ".bias"))
|
||||||
if new_name is None:
|
if new_name is None:
|
||||||
print(f"Can not map tensor {name!r}")
|
raise ValueError(f"Can not map tensor {name!r}")
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
n_dims = len(data.shape)
|
n_dims = len(data.shape)
|
||||||
data_dtype = data.dtype
|
data_dtype = data.dtype
|
||||||
|
@ -2875,7 +2874,7 @@ class OlmoModel(Model):
|
||||||
if self.ftype == 1 and data_dtype == np.float32 and n_dims == 2:
|
if self.ftype == 1 and data_dtype == np.float32 and n_dims == 2:
|
||||||
data = data.astype(np.float16)
|
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)
|
self.gguf_writer.add_tensor(new_name, data)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue