Update convert-hf-to-gguf.py

This commit is contained in:
Georgi Gerganov 2024-05-10 09:25:24 +03:00 committed by GitHub
parent 148205d87f
commit d12c57b559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -538,7 +538,7 @@ class Model:
for key in added_tokens_json:
token_id = added_tokens_json[key]
if (token_id >= vocab_size):
print(f'ignore token {token_id}: id is out of range, max={vocab_size - 1}')
logger.warning(f'ignore token {token_id}: id is out of range, max={vocab_size - 1}')
continue
tokens[token_id] = key.encode("utf-8")