-
Notifications
You must be signed in to change notification settings - Fork 12.5k
feat: Hybrid unified/recurrent cache #13276
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
Closed
gabe-l-hart
wants to merge
21
commits into
ggml-org:gg/kv-cache-simplify-part3
from
gabe-l-hart:HybridCache
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0e9f0e0
tests: Initial unit tests for memory hierarchy
gabe-l-hart b656613
build: Add build step for test-memory on non-windows builds
gabe-l-hart 9a15f27
fix(tests): Fix constructors in tests for signature changes after rebase
gabe-l-hart d74d76a
tests(wip): More robust test for unified cache
gabe-l-hart 114f2ce
feat: Add can_seq_rm API to llama_kv_cache API
gabe-l-hart 13efcf3
feat: Move layer_filter_cb up to llama_kv_cache
gabe-l-hart 6625248
feat: Add layer filter to recurrent cache
gabe-l-hart 76771e8
feat: Initial implementation of llama_kv_cache_hybrid
gabe-l-hart f031fb8
feat: Add llama_model_is_hybrid API call
gabe-l-hart 298e147
feat: Add c++ side constants for attention layer indices hparam
gabe-l-hart f472373
feat: Add support for distinguishing recurrent vs non-recurrent layer…
gabe-l-hart 404783b
feat: Auto-fill hparams.recurrent_layer_arr based on whether the mode…
gabe-l-hart 53ef2d4
feat: Instantiate hybrid cache for hybrid models (currently none)
gabe-l-hart e6ff93a
refactor: rename *_is_hybrid -> *_is_hybrid_recurrent
gabe-l-hart 226955b
fix: Fix indexing into k_l for recurrent cache with filter
gabe-l-hart 1fb08da
fix: Use per-layer sizing everywhere in kv caches
gabe-l-hart 04fe482
fix: Remove unused kv cache methods after rebase
gabe-l-hart db9a618
fix(tests): Fix constructors in tests for signature changes after rebase
gabe-l-hart 8aee2e7
feat: Add split_equal to init(...) signature
gabe-l-hart a4cc4aa
fix: Overhaul hybrid cache for refactor part3 (::init interface)
gabe-l-hart 58994f6
tests(wip): Comment out broken test for now and fix other constructor…
gabe-l-hart 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
feat: Add layer filter to recurrent cache
Branch: HybridCache Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
- Loading branch information
commit 6625248043bc39c1e8a89c591eeb7a4ac4f5ac7d
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is buggy because
push_back
is used below, so later when we index directly into the given per-layer tensor vectors, the final layers will be out-of-bounds reads.