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:
811811
812812 def add_meta_arch (self , params : Params ) -> None :
813813 name = "LLaMA"
814+
815+ # TODO: better logic to determine model name
814816 if (params .n_ctx == 4096 ):
815817 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 ]
818820
819821 self .gguf .add_name (name )
820822 self .gguf .add_context_length (params .n_ctx )
@@ -839,8 +841,7 @@ def add_meta_vocab(self, vocab: Vocab) -> None:
839841 tokens = []
840842 scores = []
841843 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
844845 for text , score , toktype in vocab .all_tokens ():
845846 tokens .append (text )
846847 scores .append (score )
You can’t perform that action at this time.
0 commit comments