Repository navigation
Make the causal conv1d, Mamba scan and Mamba2 SSD of linear attention layers kernelizable #49186
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
Open
hmellor
wants to merge
35
commits into
huggingface:main
Choose a base branch
from
hmellor:mamba2-linear-attention-interface
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,657
−2,566
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
9645219
Add a linear attention interface, starting with Mamba2's SSD core
hmellor 84d89a8
small cleanup
hmellor 9673790
fix double attr
hmellor d09dc86
Use a single linear attention registry keyed by mechanism
hmellor c8a3c68
Revert to one linear attention registry per mechanism
hmellor 97ecc73
Merge branch 'main' into mamba2-linear-attention-interface
hmellor 571d9a3
Split the Mamba2 SSD interface into conv and scan interfaces
hmellor 3aa8158
Merge branch 'main' into mamba2-linear-attention-interface
hmellor 5157924
Share the causal conv1d of linear attention layers in modeling_linear…
hmellor 6731513
Share the Mamba2 SSD and make the shared steps kernelizable
hmellor dbc4955
Replace the linear attention interfaces with shared kernelizable func…
hmellor 69ca9e3
Inline the shared linear attention steps with modular
hmellor eaea981
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor a0e0828
Make the Mamba selective scan kernelizable
hmellor e6b48eb
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor e94b862
Drop the per-width torch fallback of the shared causal conv1d
hmellor fadd192
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor d33ec3e
Serve LFM3's conv with mamba-ssm v5 and hide runtime-only mapping war…
hmellor e5fbf5f
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor 9fa71ab
Merge branch 'main' into linear-attn-utils-conv
hmellor 1439bb6
Fix CI after merging main
hmellor 819f848
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor a746a39
Merge remote-tracking branch 'upstream/main' into linear-attn-utils-conv
hmellor 70684c0
Address review: shared kernels log suppression, LFM3 kernels test, Ol…
hmellor afaca88
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor ec415ed
Address review: keep `mamba_`/`mamba2_` names and reuse Mamba via mod…
hmellor e610c89
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor 9bb2e51
Use the generic sequence classification head for Zamba and Zamba2
hmellor e1cb6cd
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor 05cbdad
Take Zamba's sequence classification head from Llama
hmellor 7bd2215
Merge branch 'linear-attn-utils-conv' into mamba2-linear-attention-in…
hmellor eb98632
Address review: forward kwargs to causal_conv1d_forward, simplify sup…
hmellor 9d13e62
Merge main into mamba2-linear-attention-interface
hmellor 38c0f12
Address review: read the recurrent state in the scans, modernise Mamb…
hmellor a968d16
Address review: inherit more of Zamba
hmellor 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
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.