From 6b8d69b451feadb38972174980314d3da9e4f179 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 13 Feb 2024 19:58:44 +0200 Subject: [PATCH] convert : skip unknown tensors (need for LLaVA) --- convert.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/convert.py b/convert.py index 75c100118..237f8d782 100755 --- a/convert.py +++ b/convert.py @@ -1195,7 +1195,9 @@ def convert_model_names(model: LazyModel, params: Params) -> LazyModel: for name, lazy_tensor in model.items(): tensor_type, name_new = tmap.get_type_and_name(name, try_suffixes = (".weight", ".bias")) or (None, None) if name_new is None: - raise Exception(f"Unexpected tensor name: {name}") + #raise Exception(f"Unexpected tensor name: {name}") + print(f"Unexpected tensor name: {name} - skipping") + continue if tensor_type in should_skip: print(f"skipping tensor {name_new}")