-
Notifications
You must be signed in to change notification settings - Fork 12.4k
llama : support Mamba Selective State Space Models #5328
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 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
8cd0a28
mamba : begin working on support for Mamba SSM
compilade 5a69a26
mamba : begin figuring out how to (ab)use the kv cache for Mamba
compilade f680364
mamba : recurrent inference almost works, but incoherent
compilade 54d3e48
mamba : recurrent inference WORKS!!!
compilade 74eea85
convert : optionally use d_conv and d_state from config.json for Mamba
compilade 9e77061
mamba : refactor recurrent conv, resulting in 20% perf increase
compilade 3f7233b
ggml : parallelize ggml_exp
compilade e9cc45e
mamba : simplify the conv step with a self-overlapping view
compilade 81b57bb
mamba : fix self-overlapping view depth stride
compilade ffc116f
mamba : handle batches of more than 1 token
compilade 78a853b
ggml : in ggml_ssm_scan, merge multiple rows in the same vec operation
compilade 5816ae6
mamba : very basic quantization support
compilade a3f4a1c
mamba : fuse more steps of the SSM scan in the ggml_ssm_scan operator
compilade 9f55809
convert : for Mamba, also consider the "MambaLMHeadModel" arch name
compilade cd0f33f
mamba : fix vocab size problems with official models
compilade de92f15
ggml : remove ggml_exp and ggml_soft_plus
compilade 766db75
mamba : remove some useless comments
compilade c52fb3c
convert : fix flake8 linter errors
compilade 6ff34da
mamba : apply suggestions from code review
compilade 8a43ffc
mamba : multiple sequences, but one at a time
compilade e73eaa7
mamba : in comments, properly refer to KV cells instead of slots
compilade de50c54
mamba : reduce memory usage of ggml_ssm_scan
compilade 9473ec2
mamba : simultaneous sequence processing
compilade 3dcf798
mamba : support llama_kv_cache_seq_cp copy chains
compilade 34e2fca
mamba : make the server and parallel examples work with whole sequences
compilade 79d636c
mamba : dedicate an input tensor for state copy indices
compilade 8f605cf
mamba : adapt perplexity, batched, and batched-bench examples
compilade 206e8ee
mamba : stop abusing attention metadata
compilade 1af1000
mamba : more correctly update the "used" field of the KV cache
compilade d52dd50
ggml : in ggml_ssm_scan, use a threshold for soft_plus
compilade b83fbc9
convert : for Mamba, fallback to internal NeoX tokenizer
compilade eefb794
mamba : support state saving and restoring
compilade 2a99d1b
ggml : implicitly pass src tensors through dst for Mamba-related ops
compilade 93fd4b8
mamba : clarify some comments
compilade 5544f52
Merge branch 'master' into support-mamba-ssm
compilade 916b586
Merge branch 'master' into support-mamba-ssm
compilade 7cd5a1f
server : fix cache_tokens not getting correctly resized
compilade d8024a4
convert-hf : support new metadata keys for Mamba
compilade 17e4d6c
mamba : rename metadata to be more similar to transformers library
compilade 1c8ea55
mamba : add missing spaces
compilade d0d32dc
convert-hf : omit output.weight when identical with token_embd.weight
compilade 3e5685f
readme : add Mamba to supported models, and add recent API changes
compilade 39579d3
mamba : move state_seq and state_mask views outside layer loop
compilade 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
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.