[GH-ISSUE #50] ollama Model is configured wrong: Double BOS #49

Open
opened 2026-10-26 21:07:36 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Snowman-25 on GitHub (Sep 19, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-Coder-V2/issues/50

Whenever I run deepseek-coder-v2:latest through ollama, the following Error pops up in the log for each prompt:

llm_tokenizer_bpe::check_double_bos_eos: Added a BOS token to the prompt as specified by the model but the prompt also starts with a BOS token. So now the final prompt starts with 2 BOS tokens. Are you sure this is what you want?

I believe that this is due to tokenizer.ggml.add_bos_token being set to true but the template also already having a <|begin▁of▁sentence|> token.

I'm not sure how this affects hallucinations of the model

Originally created by @Snowman-25 on GitHub (Sep 19, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-Coder-V2/issues/50 Whenever I run `deepseek-coder-v2:latest` through `ollama`, the following Error pops up in the log for each prompt: ``` llm_tokenizer_bpe::check_double_bos_eos: Added a BOS token to the prompt as specified by the model but the prompt also starts with a BOS token. So now the final prompt starts with 2 BOS tokens. Are you sure this is what you want? ``` I believe that this is due to `tokenizer.ggml.add_bos_token` being set to `true` but the template also already having a `<|begin▁of▁sentence|>` token. I'm not sure how this affects hallucinations of the model
Author
Owner

@Arvin2focus commented on GitHub (Jan 21, 2025):

same issue for me, any update?

<!-- gh-comment-id:2603916140 --> @Arvin2focus commented on GitHub (Jan 21, 2025): same issue for me, any update?
Author
Owner

@jianjunchang commented on GitHub (Oct 13, 2025):

same issue for me

<!-- gh-comment-id:3395691049 --> @jianjunchang commented on GitHub (Oct 13, 2025): same issue for me
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-Coder-V2#49
No description provided.