-
-
Notifications
You must be signed in to change notification settings - Fork 11k
[v0][Core] Use xgrammar shared context to avoid copy overhead for offline engine #13837
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
|
👋 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 🚀 |
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.
should it be
| if hasattr(self, 'token_bitmask') and self.token_bitmask is not None: | |
| new_processor.token_bitmask = xgr.allocate_token_bitmask( | |
| self.batch_size, self.config.vocab_size) | |
| if hasattr(self, 'token_bitmask') and self.token_bitmask is not None: | |
| new_processor.token_bitmask = self.token_bitmask |
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.
one tiny comment, if it passes the tests then LGTM.
|
@sethkimmel3 there are a few pre-commit problem can you fix this? thanks. |
Signed-off-by: Seth Kimmel <seth.kimmel3@gmail.com>
Signed-off-by: Seth Kimmel <seth.kimmel3@gmail.com>
Signed-off-by: Seth Kimmel <seth.kimmel3@gmail.com>
a19541b to
11b4114
Compare
|
I cant update the title, but can you make it to otherwise I think this should be ready to bring out of draft |
|
Done and done @aarnphm! |
|
Thanks. Once all PR pass we can merge this |
…line engine (vllm-project#13837) Signed-off-by: Seth Kimmel <seth.kimmel3@gmail.com>
…line engine (vllm-project#13837) Signed-off-by: Seth Kimmel <seth.kimmel3@gmail.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
…line engine (vllm-project#13837) Signed-off-by: Seth Kimmel <seth.kimmel3@gmail.com>
The deepcopy introduced in #11637 adds a lot of overhead when adding a large number of requests to an
llm_engine. This adds a more efficient method of copying theXGrammarLogitsProcessordata structure to remove that overhead.cc: @mgoin @aarnphm