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

@ -140,7 +140,7 @@ class GGUFReader:
def _push_field(self, field: ReaderField, skip_sum: bool = False) -> int:
if field.name in self.fields:
# TODO: add option to generate error on duplicate keys
#raise KeyError(f'Duplicate {field.name} already in list at offset {field.offset}')
# raise KeyError(f'Duplicate {field.name} already in list at offset {field.offset}')
print(f'Warning: Duplicate key {field.name} at offset {field.offset}')
self.fields[field.name + '_{}'.format(field.offset)] = field