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] Add support for Qwen2 for embeddings #10184

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Nov 9, 2024

A newer version of #5611 and #6282 since the source repo has been archived.

FIX #5600
FIX #5827
FIX #6015

Signed-off-by: DarkLight1337 <[email protected]>
Copy link

github-actions bot commented Nov 9, 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.

🚀

@mergify mergify bot added the documentation Improvements or additions to documentation label Nov 9, 2024
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Comment on lines +14 to +15
"ssmits/Qwen2-7B-Instruct-embed-base",
"Alibaba-NLP/gte-Qwen2-1.5B-instruct",
Copy link
Collaborator

Choose a reason for hiding this comment

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

How are these models different? It would be good to avoid using another ~7B model in this test

Copy link
Member Author

@DarkLight1337 DarkLight1337 Nov 9, 2024

Choose a reason for hiding this comment

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

One uses Qwen2Model, while the other uses Qwen2ForCausalLM architecture.

Comment on lines +457 to +460
pooler_config,
pooling_type=PoolingType.LAST,
normalize=True,
softmax=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this be able to be controlled by the pooling args we spoke about offline?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes - these are the model's default values which can be overridden.

@DarkLight1337
Copy link
Member Author

DarkLight1337 commented Nov 9, 2024

I still need to update the tests since these models don't have sentence-transformers equivalents.

Nevermind, I was misled by the warning message. It's intended that ssmits/Qwen2-7B-Instruct-embed-base uses mean pooling instead of last pooling.

Signed-off-by: DarkLight1337 <[email protected]>
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 9, 2024
Signed-off-by: DarkLight1337 <[email protected]>
@DarkLight1337
Copy link
Member Author

I have fixed the tests.

Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Copy link

mergify bot commented Nov 11, 2024

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

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 11, 2024
Signed-off-by: DarkLight1337 <[email protected]>
@mergify mergify bot removed the needs-rebase label Nov 11, 2024
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
2 participants