convert : add "tokenizer.ggml.pre" GGUF KV (wip)

This commit is contained in:
Georgi Gerganov 2024-04-26 19:21:55 +03:00
parent e3f6dc7409
commit 9b4d63ae53
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
6 changed files with 58 additions and 7 deletions

View file

@ -422,6 +422,9 @@ class GGUFWriter:
def add_tokenizer_model(self, model: str) -> None:
self.add_string(Keys.Tokenizer.MODEL, model)
def add_tokenizer_pre(self, pre: str) -> None:
self.add_string(Keys.Tokenizer.PRE, pre)
def add_token_list(self, tokens: Sequence[str] | Sequence[bytes] | Sequence[bytearray]) -> None:
self.add_array(Keys.Tokenizer.LIST, tokens)