Skip to content

Conversation

@noooop
Copy link
Collaborator

@noooop noooop commented Aug 11, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for 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.

Signed-off-by: wang.yuqi <[email protected]>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@github-actions
Copy link

👋 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 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 either: Add ready label to the PR or enable auto-merge.

🚀

@noooop noooop marked this pull request as draft August 11, 2025 12:39
@mergify
Copy link

mergify bot commented Aug 11, 2025

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

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

Signed-off-by: wang.yuqi <[email protected]>
@mergify mergify bot removed the needs-rebase label Aug 11, 2025
noooop added 4 commits August 12, 2025 07:22
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]>
@noooop noooop changed the title [Bugfix] fix ModernBert load [Bugfix] fix ModernBert load & enable sliding window attention for bidirectional attention. Aug 11, 2025
@noooop noooop changed the title [Bugfix] fix ModernBert load & enable sliding window attention for bidirectional attention. [Bugfix] Fix ModernBert load & Enable sliding window attention for bidirectional attention. Aug 11, 2025
Signed-off-by: Max de Bayser <[email protected]>
@maxdebayser
Copy link
Contributor

I've pushed the sliding attn changes directly on your PR, I hope that's OK.

@noooop noooop marked this pull request as ready for review August 12, 2025 00:40
@noooop
Copy link
Collaborator Author

noooop commented Aug 12, 2025

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!

@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 12, 2025
@DarkLight1337
Copy link
Member

DarkLight1337 commented Aug 12, 2025

Thanks, let's see if the tests pass

@vllm-bot vllm-bot merged commit 6d729c4 into vllm-project:main Aug 12, 2025
50 of 57 checks passed
@noooop noooop deleted the fix_modernbert branch August 12, 2025 09:19
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
…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]>
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
…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]>
yiliu30 pushed a commit to yiliu30/vllm-fork that referenced this pull request Aug 19, 2025
…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]>
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
…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]>
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…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]>
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cant classify with ModernBERT

4 participants