File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2645,8 +2645,7 @@ def write_tensors(self):
2645
2645
# map tensor names
2646
2646
new_name = tensor_map .get_name (name , try_suffixes = (".weight" , ".bias" ))
2647
2647
if new_name is None :
2648
- print (f"Can not map tensor { name !r} " )
2649
- sys .exit ()
2648
+ raise ValueError (f"Can not map tensor { name !r} " )
2650
2649
2651
2650
n_dims = len (data .shape )
2652
2651
data_dtype = data .dtype
@@ -2663,7 +2662,7 @@ def write_tensors(self):
2663
2662
if self .ftype == 1 and data_dtype == np .float32 and n_dims == 2 :
2664
2663
data = data .astype (np .float16 )
2665
2664
2666
- print (f"{ new_name } , n_dims = { n_dims } , { old_dtype } --> { data .dtype } " )
2665
+ logger . info (f"{ new_name } , n_dims = { n_dims } , { old_dtype } --> { data .dtype } " )
2667
2666
2668
2667
self .gguf_writer .add_tensor (new_name , data )
2669
2668
You can’t perform that action at this time.
0 commit comments