Skip to content

Commit

Permalink
py : add special tokens in hf_converter for RWKV v6 (#9428)
Browse files Browse the repository at this point in the history
Signed-off-by: Molly Sophia <[email protected]>
  • Loading branch information
MollySophia authored Sep 12, 2024
1 parent 2b00fa7 commit 39f852f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions convert_hf_to_gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2771,6 +2771,8 @@ def set_vocab(self):
self.gguf_writer.add_tokenizer_model("rwkv")
self.gguf_writer.add_token_list(tokens)
self.gguf_writer.add_token_types(toktypes)
special_vocab = gguf.SpecialVocab(self.dir_model, load_merges=False)
special_vocab.add_to_gguf(self.gguf_writer)

def set_gguf_parameters(self):
block_count = self.hparams["num_hidden_layers"]
Expand Down

0 comments on commit 39f852f

Please sign in to comment.