-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[V1][Perf] Faster incremental detokenization #15137
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
Exploit tokenizers library's new DecodeStream functionality for "fast" HF tokenizers. This won't help with mistral tokenizers unfortunately. Signed-off-by: Nick Hill <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
@njhill Thanks for doing this! Do you have any performance numbers by any chance? |
@WoosukKwon looks like it's noticeable for higher QPS: Before:
After:
|
@njhill The speedup looks promising! 🚀 Is this PR ready for review? If so, could you please add tests? |
@WoosukKwon yes it's ready apart from some additional tests. |
@njhill Got it. Could you please resolve the merge conflict? |
# Conflicts: # requirements/test.in
@WoosukKwon I'm just updating tests, will push those and resolve conflict at the same time. |
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Ready now @WoosukKwon, sorry the tests turned out to be a bit of a can of worms 😅 |
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
@robertgshaw2-redhat would you be interested in reviewing this PR? I'm not sure if any reviewer is assigned. |
Signed-off-by: Nick Hill <[email protected]>
I will push a fix for the remaining test failure asap. |
Signed-off-by: Nick Hill <[email protected]>
prompt_suffix = suffix | ||
break | ||
|
||
# Prime the stream. |
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.
nice way to skip the priming.
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.
Nice work.
Looks like the remaining test failures are "real", need to dig into the behavior differences that are causing them. |
This pull request has merge conflicts that must be resolved before it can be |
…rs-detok # Conflicts: # requirements/common.txt # requirements/test.in
Signed-off-by: Nick Hill <[email protected]>
Addressed the remaining test failures (due to incorrect behaviour of the existing incremental detokenization which doesn't skip some special tokens when it should). So should now be good to merge. |
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Agata Dobrzyniewicz <[email protected]>
Signed-off-by: Nick Hill <[email protected]> Signed-off-by: Mu Huai <[email protected]>
Exploit
tokenizers
library's newDecodeStream
functionality for "fast" HF tokenizers.This won't help with mistral tokenizers unfortunately.
cc @robertgshaw2-redhat