py : suggest hint for missing vocab size
This commit is contained in:
parent
90582b7341
commit
7cfcee408d
1 changed files with 1 additions and 1 deletions
|
@ -991,7 +991,7 @@ def check_vocab_size(params: Params, vocab: Vocab, pad_vocab: bool = False) -> N
|
||||||
# Handle special case where the model's vocab size is not set
|
# Handle special case where the model's vocab size is not set
|
||||||
if params.n_vocab == -1:
|
if params.n_vocab == -1:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"The model's vocab size is set to -1 in params.json. Please update it manually."
|
f"The model's vocab size is set to -1 in params.json. Please update it manually. Maybe {vocab.vocab_size}?"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check for a vocab size mismatch
|
# Check for a vocab size mismatch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue