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

[convert-hf] Fix exception in sentencepiece with added tokens #6320

Merged
merged 1 commit into from Mar 26, 2024

Conversation

pcuenca
Copy link
Contributor

@pcuenca pcuenca commented Mar 26, 2024

When adding new tokens present in added_tokens.json, the loop went out of bounds of the sentencepiece vocab, because the new tokens have not been added yet but the model's vocabulary report the total. This change first loops through the tokenizer tokens, then adds the new ones. It also verifies that the totals match.

@ggerganov ggerganov merged commit e097633 into ggerganov:master Mar 26, 2024
21 of 22 checks passed
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 3, 2024
tybalex pushed a commit to tybalex/function.cpp that referenced this pull request Apr 17, 2024
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.

None yet

2 participants