File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -811,10 +811,12 @@ def __init__(self, fname_out: Path) -> None:
811
811
812
812
def add_meta_arch (self , params : Params ) -> None :
813
813
name = "LLaMA"
814
+
815
+ # TODO: better logic to determine model name
814
816
if (params .n_ctx == 4096 ):
815
817
name = "LLaMA v2"
816
- if params .path_model :
817
- name = str (params .path_model .parent ).split ('/' )[- 1 ]
818
+ elif params .path_model :
819
+ name = str (params .path_model .parent ).split ('/' )[- 1 ]
818
820
819
821
self .gguf .add_name (name )
820
822
self .gguf .add_context_length (params .n_ctx )
@@ -839,8 +841,7 @@ def add_meta_vocab(self, vocab: Vocab) -> None:
839
841
tokens = []
840
842
scores = []
841
843
toktypes = []
842
- # NOTE: `all_tokens` returns the the base vocabulary and added tokens
843
- # TODO: add special tokens?
844
+ # NOTE: `all_tokens` returns the base vocabulary and added tokens
844
845
for text , score , toktype in vocab .all_tokens ():
845
846
tokens .append (text )
846
847
scores .append (score )
You can’t perform that action at this time.
0 commit comments