Skip to content
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

[Model] Adding Support for Qwen2VL as an Embedding Model. Using MrLight/dse-qwen2-2b-mrl-v1 #9944

Merged
merged 10 commits into from
Nov 13, 2024

Conversation

FurtherAI
Copy link
Contributor

@FurtherAI FurtherAI commented Nov 2, 2024

[Model] Adding Support for Qwen2VL as an Embedding Model. Using MrLight/dse-qwen2-2b-mrl-v1


This is related to #9303 and #9759 and adds support for Qwen2VL as an embedding model. This is only a couple of lines of changes and a jinja template for the API.

I have tested that this is working correctly with MrLight/dse-qwen2-2b-mrl-v1. The test file is a bit ugly though. I don't think the hf_runner supports the input processing that needs to be done for this model because it uses process_vision_info and applies a chat template manually. It also takes a minimum size image placeholder for text embedding.

Looking for a little help with how the test should be written to cleanly handle these differences.

  • Update documentation to include this.
  • Add a test for the API maybe.

I have tested the API, but didn't look into how to add it to test_vision_embedding.py yet.

cc @DarkLight1337

Copy link

github-actions bot commented Nov 2, 2024

👋 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.

🚀

@DarkLight1337 DarkLight1337 self-assigned this Nov 2, 2024
@FurtherAI
Copy link
Contributor Author

@DarkLight1337 Do you want any changes to the vision embedding API test? It looks like generally those tests are more about the endpoint than if the model they're calling is returning the correct output.

@mergify mergify bot added the documentation Improvements or additions to documentation label Nov 7, 2024
Signed-off-by: FurtherAI <[email protected]>
@DarkLight1337
Copy link
Member

Do you want any changes to the vision embedding API test? It looks like generally those tests are more about the endpoint than if the model they're calling is returning the correct output.

It looks quite complicated. Can you factor out the common code so it is more like the other embedding model tests?

@FurtherAI
Copy link
Contributor Author

Do you want any changes to the vision embedding API test? It looks like generally those tests are more about the endpoint than if the model they're calling is returning the correct output.

It looks quite complicated. Can you factor out the common code so it is more like the other embedding model tests?

Do you mean the offline test looks complicated? I think the question still stands about if you want anything added to the API test.

@DarkLight1337
Copy link
Member

DarkLight1337 commented Nov 9, 2024

Do you want any changes to the vision embedding API test? It looks like generally those tests are more about the endpoint than if the model they're calling is returning the correct output.

It looks quite complicated. Can you factor out the common code so it is more like the other embedding model tests?

Do you mean the offline test looks complicated? I think the question still stands about if you want anything added to the API test.

I was referring to the offline API tests. I don't see any changes to the online API tests though (which are under entrypoints/openai) - what do you mean by API tests?

Copy link

mergify bot commented Nov 9, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @FurtherAI.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Nov 9, 2024
@FurtherAI
Copy link
Contributor Author

Do you want any changes to the vision embedding API test? It looks like generally those tests are more about the endpoint than if the model they're calling is returning the correct output.

It looks quite complicated. Can you factor out the common code so it is more like the other embedding model tests?

Do you mean the offline test looks complicated? I think the question still stands about if you want anything added to the API test.

I was referring to the offline API tests. I don't see any changes to the online API tests though (which are under entrypoints/openai) - what do you mean by API tests?

Those are the API tests I was referring to.

I can improve the code for the test I think. I'll test it next week.

@DarkLight1337
Copy link
Member

There is no need to update online API tests for new models.

@mergify mergify bot removed the needs-rebase label Nov 12, 2024
@DarkLight1337
Copy link
Member

PTAL at the failing model tests. Can we omit using qwen2_vl_utils?

@FurtherAI
Copy link
Contributor Author

PTAL at the failing model tests. Can we omit using qwen2_vl_utils?

Yeah I can probably drop that. I think it is only resizing the image

@DarkLight1337
Copy link
Member

Please also merge from main to fix the broken CI.

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests have passed, thanks for your patience!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) November 13, 2024 07:03
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 13, 2024
@DarkLight1337 DarkLight1337 merged commit 1b886aa into vllm-project:main Nov 13, 2024
65 checks passed
@FurtherAI FurtherAI deleted the dse_qwen2_2b_mrl_v1 branch November 13, 2024 17:27
rickyyx pushed a commit to rickyyx/vllm that referenced this pull request Nov 13, 2024
…ht/dse-qwen2-2b-mrl-v1 (vllm-project#9944)

Signed-off-by: FurtherAI <[email protected]>
Co-authored-by: FurtherAI <[email protected]>
omer-dayan pushed a commit to omer-dayan/vllm that referenced this pull request Nov 14, 2024
…ht/dse-qwen2-2b-mrl-v1 (vllm-project#9944)

Signed-off-by: FurtherAI <[email protected]>
Co-authored-by: FurtherAI <[email protected]>
Signed-off-by: OmerD <[email protected]>
sumitd2 pushed a commit to sumitd2/vllm that referenced this pull request Nov 14, 2024
…ht/dse-qwen2-2b-mrl-v1 (vllm-project#9944)

Signed-off-by: FurtherAI <[email protected]>
Co-authored-by: FurtherAI <[email protected]>
Signed-off-by: Sumit Dubey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants