[Memory] Add unit tests for llama_memory_hybrid cross-memory operations
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start by reading src/llama-memory-hybrid.h/cpp and src/llama-memory-hybrid-iswa.h/cpp to understand the llama_memory_i interface and existing memory tests. Add tests/test-memory-hybrid.cpp using models with alternating and grouped attention/recurrent layers, covering routing, synchronization, buffer isolation, next(), apply(), and memory_breakdown(). Run the repository's C++ test suite and confirm both sub-memories are covered.
Written by the indexing model from the issue text.
Description
Summary
Hybrid memory combines attention-based KV cache and recurrent memory but lacks dedicated tests.
Current State
llama_memory_hybridmanages two sub-memory instances:mem_attn: Standard KV cache for attention layersmem_recr: Recurrent memory for RNN layers
Missing Test Coverage
- Batch splitting: Verify ubatches are correctly routed to appropriate memory type
- Cross-memory coherence: Ensure position indices stay synchronized
- Buffer type isolation: Verify each memory type uses correct backend buffers
- Hybrid context operations: Test
next()andapply()across memory boundaries
Test Scenarios
- Model with alternating attention/recurrent layers
- Model with early recurrent layers + late attention layers
- State operations spanning both memory types
Acceptance Criteria
- Create
tests/test-memory-hybrid.cpp - Test all
llama_memory_iinterface methods - Verify
memory_breakdown()correctly aggregates from both sub-memories
Related Files
src/llama-memory-hybrid.h/cppsrc/llama-memory-hybrid-iswa.h/cpp
- Dominant language
- C++
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jose-compu/funes.cpp
-
stale
Difficulty 5/5 Over a week Newbie friendliness 25/100
jose-compu/funes.cpp#12 ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 52/100
jose-compu/funes.cpp#11 ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 48/100
jose-compu/funes.cpp#10 ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 55/100
jose-compu/funes.cpp#9 ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 45/100
jose-compu/funes.cpp#8 ·
All issues in jose-compu/funes.cpp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
tesseract-ocr/tesseract#4627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
lxqt/lxqt-panel#2492 ·
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[models/demos/gemma4 dFlash]: _shard_argmax returns a view of a force-freed tensor when rows == 1Opencommunity
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
tenstorrent/tt-metal#57989 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100