Skip to content

Conversation

JohannesGaessler
Copy link
Collaborator

Alternative to #7107 .

This PR adds a warning when a BOS token is added automatically and this results in 2 BOS tokens at the beginning of the prompt since this is almost always going to be user error and not intentional.

reuank added a commit to reuank/ThinkBench that referenced this pull request May 16, 2024
…the llama.cpp server in order to avoid double BOS at the beginning of the prompt (see discussions at ggml-org/llama.cpp#7107 (comment) and ggml-org/llama.cpp#7332)
@mofosyne mofosyne added enhancement New feature or request Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix labels May 16, 2024
llama.cpp Outdated
}
}

if (add_special && vocab.special_add_bos != 0 && output[1] == vocab.special_bos_id) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we should also check output.size() > 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants