Testing how well Qwen3.5-27B-8bit implements memory decay#2
Open
Testing how well Qwen3.5-27B-8bit implements memory decay#2
Conversation
added 15 commits
February 25, 2026 23:10
Added decay_enabled, decay_threshold, and decay_rate fields with: - Default values: decay_enabled=True, decay_threshold=10, decay_rate=0.95 - Config file support for all three options - Environment variable support: DECAY_ENABLED, DECAY_THRESHOLD, DECAY_RATE
- Add AccessEvent dataclass with concept_id, activation, and timestamp fields - Add record_access(), get_access_events(), and clear_access_events() to MemoryStore protocol - Implement access event storage in SQLiteMemoryStore with new access_events table - All 183 existing tests pass
- Add decay.py with MemoryDecayer class - Apply relative decay to all concept confidences - Reinforce accessed concepts based on activation level - Spread reinforcement to neighbors via relations with configurable depth - Track access_count and last_accessed_at on reinforced concepts - Return DecayResult with statistics about the operation
- Import MemoryDecayer and DecayResult - Add decay_enabled and decay_rate parameters to __init__ - Implement decay() method that respects config and returns DecayResult
Test decay config defaults (enabled=True, threshold=10, rate=0.95), config file overrides, environment variable overrides, and priority (env > file > defaults).
Tests verify: - Access events are recorded during retrieval with correct activation levels - Access events are cleared after decay runs - Recall counter increments on retrieval and resets after decay - Concept last_accessed_at and access_count fields update after decay - DecayResult serialization works correctly
- Test decay reduces confidence correctly by decay_rate - Test reinforcement works for accessed concepts - Test spreading reinforcement reaches neighbors via relations - Test state cleanup (access events cleared, recall counter reset) - Test decay with no access events only applies decay - Test confidence bounds are preserved (0.0-1.0)
- Add _decay_threshold field to MemoryInterface - Check recall count after each recall and trigger decay when threshold reached - Reset recall counter after decay runs - Add comprehensive tests for batch trigger mechanism - Verify decay doesn't run below threshold - Verify decay triggers at threshold - Verify counter resets after decay - Verify decay is skipped when disabled
- Add force parameter to MemoryInterface.decay() to allow manual decay when disabled - Add tests for access event accumulation when decay is disabled - Add tests for manual decay with force=True overriding disabled state - Add tests for state consistency when enabling decay after disabled mode
ceaa713 to
ddce240
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.