mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-26 19:55:04 +00:00
convert : fix rwkv bos/eos token (#13844)
This commit is contained in:
@ -1047,6 +1047,10 @@ class TextModel(ModelBase):
|
|||||||
special_vocab.chat_template = "rwkv-world"
|
special_vocab.chat_template = "rwkv-world"
|
||||||
# hack: Add '\n\n' as the EOT token to make it chat normally
|
# hack: Add '\n\n' as the EOT token to make it chat normally
|
||||||
special_vocab._set_special_token("eot", 261)
|
special_vocab._set_special_token("eot", 261)
|
||||||
|
# hack: Override these as they have already been set (incorrectly)
|
||||||
|
special_vocab.special_token_ids["bos"] = 0
|
||||||
|
special_vocab.special_token_ids["eos"] = 0
|
||||||
|
|
||||||
special_vocab.add_to_gguf(self.gguf_writer)
|
special_vocab.add_to_gguf(self.gguf_writer)
|
||||||
|
|
||||||
def _set_vocab_builtin(self, model_name: Literal["gpt-neox", "llama-spm"], vocab_size: int):
|
def _set_vocab_builtin(self, model_name: Literal["gpt-neox", "llama-spm"], vocab_size: int):
|
||||||
|
Reference in New Issue
Block a user