change add_meta_vocab fucntion
This commit is contained in:
parent
ea9f35f082
commit
c7b636e950
1 changed files with 2 additions and 2 deletions
|
@ -913,12 +913,12 @@ class OutputFile:
|
|||
scores.append(score)
|
||||
toktypes.append(toktype)
|
||||
|
||||
if isinstance(vocab, SentencePieceVocab):
|
||||
if isinstance(vocab, SentencePieceVocab) or isinstance(vocab, HFVocab):
|
||||
self.gguf.add_tokenizer_model("llama")
|
||||
elif isinstance(vocab, BpeVocab):
|
||||
self.gguf.add_tokenizer_model("gpt2")
|
||||
else:
|
||||
raise ValueError(f'Unknown vocab type: Not BpeVocab or SentencePieceVocab')
|
||||
raise ValueError(f'Unknown vocab type: Not BpeVocab or SentencePieceVocab or HFVocab')
|
||||
self.gguf.add_token_list(tokens)
|
||||
self.gguf.add_token_scores(scores)
|
||||
self.gguf.add_token_types(toktypes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue