Переглянути джерело

convert : get general.name from model dir, not its parent (#5615)

Co-authored-by: Brian <mofosyne@gmail.com>
Jared Van Bortel 1 рік тому
батько
коміт
dda64fc17c
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      convert.py

+ 1 - 1
convert.py

@@ -1109,7 +1109,7 @@ class OutputFile:
         if metadata is not None and metadata.name is not None:
         if metadata is not None and metadata.name is not None:
             name = metadata.name
             name = metadata.name
         elif params.path_model is not None:
         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:
         elif params.n_ctx == 4096:
             # Heuristic detection of LLaMA v2 model
             # Heuristic detection of LLaMA v2 model
             name = "LLaMA v2"
             name = "LLaMA v2"