Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Memory] Add comprehensive tests for llama_memory_recurrent state operations

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
testing

Research direction

Start by reading src/llama-memory-recurrent.h and src/llama-memory-recurrent.cpp to understand the state operations and cell metadata. Add tests/test-memory-recurrent.cpp covering write/read roundtrips, partial sequence operations, metadata persistence, multiple sequences, and error paths. Done means the requested operations are covered and coverage of llama-memory-recurrent.cpp exceeds 80%.

Written by the indexing model from the issue text.

Description

stale

Summary

The recurrent memory implementation (src/llama-memory-recurrent.cpp) needs comprehensive tests for state operations.

Current State

  • llama_memory_recurrent implements the llama_memory_i interface for RNN-based models (Mamba, etc.)
  • Has state write/read methods but limited test coverage

Missing Test Coverage

  1. State Write/Read roundtrip: Verify state_write() followed by state_read() preserves cell data
  2. Partial sequence operations: Test seq_rm, seq_cp, seq_keep with various position ranges
  3. Cell metadata: Verify pos, src, src0, tail fields are correctly persisted
  4. Multi-sequence handling: Test with n_seq_max > 1

Acceptance Criteria

  • Add test file tests/test-memory-recurrent.cpp
  • Achieve >80% coverage of llama-memory-recurrent.cpp
  • Test both successful operations and error paths

Related Files

  • src/llama-memory-recurrent.h
  • src/llama-memory-recurrent.cpp
Dominant language
C++
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jose-compu/funes.cpp

All issues in jose-compu/funes.cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.