llama: log warning if there's no vocab_size in metadata
This commit is contained in:
parent
544b26640d
commit
9704f0e928
1 changed files with 3 additions and 2 deletions
|
@ -6062,8 +6062,9 @@ static void llm_load_vocab(
|
|||
vocab.linefeed_id = -1;
|
||||
|
||||
// read vocab size from metadata
|
||||
ml.get_key(LLM_KV_VOCAB_SIZE, vocab.n_vocab);
|
||||
|
||||
if (!ml.get_key(LLM_KV_VOCAB_SIZE, vocab.n_vocab, false)) {
|
||||
LLAMA_LOG_WARN("%s: there is no vocab_size in metadata, vocab.n_vocab will be set to 0\n", __func__);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue