From: Jared Van Bortel Date: Thu, 16 May 2024 06:15:23 +0000 (-0400) Subject: convert : get general.name from model dir, not its parent (#5615) X-Git-Tag: upstream/0.0.4488~1587 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=dda64fc17c97820ea9489eb0cc9ae8b8fdce4926;p=pkg%2Fggml%2Fsources%2Fllama.cpp convert : get general.name from model dir, not its parent (#5615) Co-authored-by: Brian --- diff --git a/convert.py b/convert.py index e2e64235..da124795 100755 --- a/convert.py +++ b/convert.py @@ -1109,7 +1109,7 @@ class OutputFile: 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"