py : add special tokens in hf_converter for RWKV v6 (#9428)

Signed-off-by: Molly Sophia <mollysophia379@gmail.com>
This commit is contained in:
Molly Sophia 2024-09-12 19:25:16 +08:00 committed by GitHub
parent 2b00fa7997
commit 39f852f440
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2771,6 +2771,8 @@ class Rwkv6Model(Model):
self.gguf_writer.add_tokenizer_model("rwkv") self.gguf_writer.add_tokenizer_model("rwkv")
self.gguf_writer.add_token_list(tokens) self.gguf_writer.add_token_list(tokens)
self.gguf_writer.add_token_types(toktypes) 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): def set_gguf_parameters(self):
block_count = self.hparams["num_hidden_layers"] block_count = self.hparams["num_hidden_layers"]