Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama : the WPM vocabs use the CLS token as BOS #10930

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ggerganov
Copy link
Owner

@ggerganov ggerganov commented Dec 21, 2024

llama.cpp/src/llama-vocab.cpp

Lines 1529 to 1535 in 9d5c711

case LLAMA_VOCAB_TYPE_WPM:
{
if (add_special) {
GGML_ASSERT(vocab.special_cls_id != -1);
output.push_back(vocab.special_cls_id);
}

Not sure if this separation of BOS and CLS tokens is really necessary. The alternative would be to remove the notion of CLS tokens from the codebase and work only with BOS tokens - seems much simpler. The problem would be if there are models that have both BOS and CLS tokens that are distinct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant