From dda64fc17c97820ea9489eb0cc9ae8b8fdce4926 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Thu, 16 May 2024 02:15:23 -0400 Subject: [PATCH] convert : get general.name from model dir, not its parent (#5615) Co-authored-by: Brian --- convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.py b/convert.py index e2e6423516d15..da1247957780c 100755 --- a/convert.py +++ b/convert.py @@ -1109,7 +1109,7 @@ def add_meta_model(self, params: Params, metadata: Metadata) -> None: if metadata is not None and metadata.name is not None: name = metadata.name elif params.path_model is not None: - name = str(params.path_model.parent).split("/")[-1] + name = params.path_model.name elif params.n_ctx == 4096: # Heuristic detection of LLaMA v2 model name = "LLaMA v2"