llama : avoid fprintf in favor of LLAMA_LOG (#3538)

This commit is contained in:
Georgi Gerganov 2023-10-17 22:34:26 +03:00
parent 8402566a7c
commit e1675d133c
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 3 additions and 3 deletions

View File

@ -2327,13 +2327,13 @@ static void llm_load_vocab(
} }
if (special_tokens_definition_mismatch || special_tokens_count_from_verification != special_tokens_count_by_type) { if (special_tokens_definition_mismatch || special_tokens_count_from_verification != special_tokens_count_by_type) {
fprintf(stderr, "%s: warning: Mismatch in special tokens definition ( %u/%zu vs %u/%zu ).\n", LLAMA_LOG_WARN("%s: mismatch in special tokens definition ( %u/%zu vs %u/%zu ).\n",
__func__, __func__,
special_tokens_count_from_verification, vocab.id_to_token.size(), special_tokens_count_from_verification, vocab.id_to_token.size(),
special_tokens_count_by_type, vocab.id_to_token.size() special_tokens_count_by_type, vocab.id_to_token.size()
); );
} else { } else {
fprintf(stderr, "%s: Special tokens definition check successful ( %u/%zu ).\n", LLAMA_LOG_INFO("%s: special tokens definition check successful ( %u/%zu ).\n",
__func__, __func__,
special_tokens_count_from_verification, vocab.id_to_token.size() special_tokens_count_from_verification, vocab.id_to_token.size()
); );