gguf.py : add token types

This commit is contained in:
klosax 2023-08-14 22:08:40 +02:00 committed by GitHub
parent 5d518d421f
commit cedb4870c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,6 +297,9 @@ class GGUFWriter:
def add_token_merges(self, merges: List):
self.add_array(constants.KEY_TOKENIZER_MERGES, merges)
def add_token_types(self, types: List[int]):
self.add_array(constants.KEY_TOKENIZER_TOKEN_TYPE, types)
def add_token_scores(self, scores: List[float]):
self.add_array(constants.KEY_TOKENIZER_SCORES, scores)