-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
[Bugfix] Fix ModernBert load & Enable sliding window attention for bidirectional attention. #22637
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
Signed-off-by: wang.yuqi <[email protected]>
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.
Code Review
This pull request provides a set of crucial bug fixes for the ModernBert model implementation, ensuring its correct loading and functionality within vLLM. The changes address several key areas: a data type mismatch in the pooling layer's head, incorrect weight loading paths, and an erroneous argument name in a forward pass, all of which are critical for the model's operation. The removal of SupportsV0Only is also a positive step towards broader compatibility. Additionally, a new test file is introduced with well-designed tests for both classification and reranking models, validating the fixes and improving test coverage. The overall changes are excellent and significantly improve the reliability of ModernBert models.
|
👋 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 🚀 |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: Max de Bayser <[email protected]>
|
I've pushed the sliding attn changes directly on your PR, I hope that's OK. |
The local test runs successfully on my machine. Looking forward to future cooperation! |
|
Thanks, let's see if the tests pass |
…directional attention. (vllm-project#22637) Signed-off-by: wang.yuqi <[email protected]> Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Max de Bayser <[email protected]> Signed-off-by: Paul Pak <[email protected]>
…directional attention. (vllm-project#22637) Signed-off-by: wang.yuqi <[email protected]> Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Max de Bayser <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
…directional attention. (vllm-project#22637) Signed-off-by: wang.yuqi <[email protected]> Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Max de Bayser <[email protected]>
…directional attention. (vllm-project#22637) Signed-off-by: wang.yuqi <[email protected]> Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Max de Bayser <[email protected]>
…directional attention. (vllm-project#22637) Signed-off-by: wang.yuqi <[email protected]> Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Max de Bayser <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
…directional attention. (vllm-project#22637) Signed-off-by: wang.yuqi <[email protected]> Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Max de Bayser <[email protected]>
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.Purpose
Fix #22620
Test Plan
pytest -s -vvv tests/models/language/pooling/test_gte.py::test_rerank_models_mteb
Test Result
pass
(Optional) Documentation Update
Known Issues
Does not support fp32
NotImplementedError: FlexAttention does not support sliding window yet.