Skip to content

Commit f68e8fa

Browse files
ggerganovtinglou
authored andcommitted
vocab : fix double-eos check (ggml-org#11273)
ggml-ci
1 parent f835d47 commit f68e8fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-vocab.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ struct llm_tokenizer_bpe_session {
439439
"also starts with a BOS token. So now the final prompt starts with 2 BOS tokens. "
440440
"Are you sure this is what you want?\n", __FUNCTION__);
441441
}
442-
if (vocab.get_add_bos() && output.size() >= 2 && *(output.end()-2) == vocab.token_eos()) {
442+
if (vocab.get_add_eos() && output.size() >= 2 && *(output.end()-2) == vocab.token_eos()) {
443443
LLAMA_LOG_WARN(
444444
"%s: Added a EOS token to the prompt as specified by the model but the prompt "
445445
"also ends with a EOS token. So now the final prompt ends with 2 EOS tokens. "

0 commit comments

Comments
 (0)