Repository navigation
Add FA2 fallback (kernel) support to the modernbert model - #42952
Closed
YangKai0616 wants to merge 4 commits into
Closed
YangKai0616 wants to merge 4 commits into
YangKai0616 wants to merge 4 commits into
Conversation
Contributor
Author
|
Hey, @vasqu , pls help review. Thx! |
vasqu
reviewed
Dec 19, 2025
vasqu
left a comment
Collaborator
There was a problem hiding this comment.
Sorry about being strict here but I'd rather that we refactor modernbert with the attention interface. This model in general needs a big refactor as it does not follow many of our standards.
This feels like it will only create tech debt and many other models would fall under similar conditions where we could manually update them but it is not the way to go.
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: modernbert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
modernbertmodel.Related UT:
tests/models/pe_audio/test_modeling_pe_audio.py::PeAudioModelTest::test_init_weights_can_init_bufferswill report an errorAssertionError: False is not true : The following buffers are not properly handled in `_init_weights()` (the model should be able to reinitialize them correctly if t....Root cause: The
inv_freqbuffer inModernBertUnpaddedRotaryEmbedding(inherited fromflash_attn's RotaryEmbedding) was not properly initialized when loading from meta device. Addedreinitialization logic in
_init_weights()to compute and copy correctinv_freqvalues.