[V1][Perf] Faster incremental detokenization#15137
[V1][Perf] Faster incremental detokenization#15137vllm-bot merged 16 commits intovllm-project:mainfrom
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.
nice way to skip the priming.
|
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