-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Port Multi-Latent Attention to HybridModel
#4452
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
9386fd8
Port MLA to HybridModel
janEbert 9568486
Add tests for HybridModel MLA
janEbert 59fbe0b
Rename "Mamba block" to "Hybrid block"
janEbert 5242ca4
Raise an error for twice-configured Q/KV norms
janEbert 1749d95
Support setting QK norm from config for MLA
janEbert 984368d
Do not apply norm+linear fusion automatically
janEbert 6fb703f
Make existing tests more flexible
janEbert 615a6df
Add initial Hybrid MLA/DSA QK config tests
janEbert af3fd7b
Add additional tests
janEbert ccaefce
Support `mla_down_proj_fusion=True`
janEbert e0f58fd
Add tests for Hybrid + `mla_down_proj_fusion`
janEbert 070dae9
Fix type error
janEbert 7d3eda1
Simplify norm resolution
janEbert e9d776a
Fix norm config resolution
janEbert 4c6aaa5
Fix tests
janEbert fee07c3
Move conditional imports to unconditionally global
janEbert e17fcfc
Add backend utility
janEbert 4b25b98
Support all backends
janEbert f9e2c30
Fix return type
janEbert 6777113
Fix layer type checks
janEbert a63c7a8
Check for fusion layers explicitly
janEbert f47a2d3
Fix quotes
janEbert 3f9c155
Be more lenient with specs
janEbert 662d7ad
Fix automatic MLA inference
janEbert 50d8018
Fix config not matching specs
janEbert d3b5240
Do not repeat oneself
janEbert 8858492
Improve norm spec test generality
janEbert 084df1f
Align error types
janEbert aea1087
Fix test regexps
janEbert 4dc68df
Copy less data
janEbert 6586e77
Revert "Copy less data"
janEbert 80d2a26
Refactor condition check
janEbert a45492a
Fix equality checks
janEbert e414280
Simplify QK norm validation and resolution
janEbert 9d8d778
Refactor QK norm validation/resolution to new file
janEbert f5e9978
Fix docstring and variable name
janEbert bc9b93f
Fix up AbsorbedMLA
janEbert e4aa27d
Fix tests
janEbert 19af620
Document deepcopy
janEbert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.