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 @@ -2857,8 +2857,7 @@ def write_tensors(self):
2857
2857
# map tensor names
2858
2858
new_name = tensor_map .get_name (name , try_suffixes = (".weight" , ".bias" ))
2859
2859
if new_name is None :
2860
- print (f"Can not map tensor { name !r} " )
2861
- sys .exit ()
2860
+ raise ValueError (f"Can not map tensor { name !r} " )
2862
2861
2863
2862
n_dims = len (data .shape )
2864
2863
data_dtype = data .dtype
@@ -2875,7 +2874,7 @@ def write_tensors(self):
2875
2874
if self .ftype == 1 and data_dtype == np .float32 and n_dims == 2 :
2876
2875
data = data .astype (np .float16 )
2877
2876
2878
- print (f"{ new_name } , n_dims = { n_dims } , { old_dtype } --> { data .dtype } " )
2877
+ logger . info (f"{ new_name } , n_dims = { n_dims } , { old_dtype } --> { data .dtype } " )
2879
2878
2880
2879
self .gguf_writer .add_tensor (new_name , data )
2881
2880
You can’t perform that action at this time.
0 commit comments