We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58fa4dc commit ce00528Copy full SHA for ce00528
convert.py
@@ -846,7 +846,12 @@ def add_meta_vocab(self, vocab: Vocab) -> None:
846
scores.append(score)
847
toktypes.append(toktype)
848
849
- self.gguf.add_tokenizer_model("llama")
+ if isinstance(vocab, SentencePieceVocab):
850
+ self.gguf.add_tokenizer_model("llama")
851
+ elif isinstance(vocab, BpeVocab):
852
+ self.gguf.add_tokenizer_model("gpt2")
853
+ else:
854
+ raise ValueError(f'Unknown vocab type: Not BpeVocab or SentencePieceVocab')
855
self.gguf.add_token_list(tokens)
856
self.gguf.add_token_scores(scores)
857
self.gguf.add_token_types(toktypes)
0 commit comments