- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10.9k
[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 <nhill@redhat.com>
| 👋 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 <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
| @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 <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
| Ready now @WoosukKwon, sorry the tests turned out to be a bit of a can of worms 😅 | 
Signed-off-by: Nick Hill <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
| @robertgshaw2-redhat would you be interested in reviewing this PR? I'm not sure if any reviewer is assigned. | 
Signed-off-by: Nick Hill <nhill@redhat.com>
| I will push a fix for the remaining test failure asap. | 
Signed-off-by: Nick Hill <nhill@redhat.com>
| 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 <nhill@redhat.com>
| 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 <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: Yang Wang <elainewy@meta.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: Agata Dobrzyniewicz <adobrzyniewicz@habana.ai>
Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
Exploit
tokenizerslibrary's newDecodeStreamfunctionality for "fast" HF tokenizers.This won't help with mistral tokenizers unfortunately.
cc @robertgshaw2-redhat