Skip to content

Commit 9d5c711

Browse files
committed
llama : the WPM vocabs use the CLS token as BOS
ggml-ci
1 parent 5cd85b5 commit 9d5c711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-vocab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ bool llama_token_is_control_impl(const struct llama_vocab & vocab, llama_token t
16571657
}
16581658

16591659
llama_token llama_token_bos_impl(const struct llama_vocab & vocab) {
1660-
return vocab.special_bos_id;
1660+
return vocab.type != LLAMA_VOCAB_TYPE_WPM ? vocab.special_bos_id : vocab.special_cls_id;
16611661
}
16621662

16631663
llama_token llama_token_eos_impl(const struct llama_vocab & vocab) {

0 commit comments

Comments
 (0)