Skip to content

[V1] Use input_ids as input for text-only models - #11032

Merged
WoosukKwon merged 9 commits into
mainfrom
v1-embedding-cg
Dec 11, 2024
Merged

WoosukKwon merged 9 commits into
mainfrom
v1-embedding-cg

Conversation

@WoosukKwon

@WoosukKwon WoosukKwon commented Dec 9, 2024 •

Copy link
Copy Markdown
Collaborator

Currently, the model runner in V1 always uses input_embeds rather than input_ids for the compatibility with multi-modal models. However, this excludes the embedding layer from the CUDA graph, and thus causes slight performance regression (and larger performance regression when TP > 1). This PR addresses this by using the input_ids for text-only models while keeping using input_embeds for multi-modal models.

Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
@github-actions

github-actions Bot commented Dec 9, 2024

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
@ywang96 ywang96 self-assigned this Dec 10, 2024
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

Chatted offline with @ywang96, while we also need to support input embeddings for text-only models, this PR is good to go since the API is still not ready for V1.

@WoosukKwon
WoosukKwon merged commit d643c2a into main Dec 11, 2024
@WoosukKwon
WoosukKwon deleted the v1-embedding-cg branch December 11, 2024 18:49
sleepwalker2017 pushed a commit to sleepwalker2017/vllm that referenced this pull request Dec 13, 2024
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
philippesic pushed a commit to philippesic/vllm-semantic-cache that referenced this pull request Jul 19, 2026
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
plasticchris pushed a commit to plasticchris/vllm that referenced this pull request Jul 20, 2026
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants