-
Notifications
You must be signed in to change notification settings - Fork 13k
server : fix crash when using verbose output with input tokens that are not in printable range (#12178) #12338
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bonus: would be nice if you can add a test case for it, see server/tests/test_tokenize.py
f0d9d04
to
1e14b14
Compare
@ngxson are you OK to merge this? I rebased the changes. re: adding a test - I think How about we merge this as-is? |
I only refer to that file so you can see how the code looks like. Adding test should be easy and it is a good way to show that your code actually work. |
…re not in printable range (ggml-org#12178) (ggml-org#12338) * Fix DOS index bug * Remove new APIs * remove extra line * Remove from API * Add extra newline * Update examples/server/server.cpp --------- Co-authored-by: Xuan-Son Nguyen <[email protected]>
…re not in printable range (ggml-org#12178) (ggml-org#12338) * Fix DOS index bug * Remove new APIs * remove extra line * Remove from API * Add extra newline * Update examples/server/server.cpp --------- Co-authored-by: Xuan-Son Nguyen <[email protected]>
This PR fixes #12178.
Previously, when calling
/completions
with a token outside of the token vocabulary range, you would get this exception:Now, the server continues to run, and the user gets a useful error: