Skip to content

llama : sanitize invalid tokens #9357

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

Merged
merged 3 commits into from
Sep 7, 2024
Merged

llama : sanitize invalid tokens #9357

merged 3 commits into from
Sep 7, 2024

Conversation

ggerganov
Copy link
Member

Should fix server CI noticed in #9354

@slaren
Copy link
Member

slaren commented Sep 7, 2024

This will probably also need checks to be added to llama.cpp and/or the server to avoid the possibility of crashing the server from client inputs.

#9333 is similar to this.

@ggerganov
Copy link
Member Author

Maybe better to add the checks in the server, since adding to libllama might incur some measurable overhead for checking all input tokens.

@slaren
Copy link
Member

slaren commented Sep 7, 2024

I wouldn't expect the overhead to be significant, it's little more than two comparisons per token.

@ggerganov ggerganov changed the title common : do not add null tokens during warmup llama : sanitize invalid tokens Sep 7, 2024
@ggerganov ggerganov merged commit faf69d4 into master Sep 7, 2024
59 checks passed
@ggerganov ggerganov deleted the gg/warmup-fx branch September 7, 2024 21:33
dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
* common : do not add null tokens during warmup

ggml-ci

* llama : check that the input tokens are valid

ggml-ci

* tests : fix batch size of bert model

ggml-ci
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 15, 2024
* common : do not add null tokens during warmup

ggml-ci

* llama : check that the input tokens are valid

ggml-ci

* tests : fix batch size of bert model

ggml-ci
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Nov 18, 2024
* common : do not add null tokens during warmup

ggml-ci

* llama : check that the input tokens are valid

ggml-ci

* tests : fix batch size of bert model

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

Successfully merging this pull request may close these issues.

2 participants