Repository navigation
Open native Qwen memory without a temporary dense row table - #57
Merged
Merged
Conversation
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.
Reopening a native Qwen memory bundle previously constructed a dense placeholder embedding and, for identity checkpoints, recreated the full training row matrix before replacing it with the native reader. That temporary allocation undermined the memory benefit of opening file-backed storage.
Install the staged native reader during Engram branch construction and reconstruct only the identity addressing map. Validate head partitions, dtype, checksums and nonrow weights before inference. The default training/source restore path retains its original initialization. Exact-key, matched hash, native-OOV hash and historical bundle behavior remain compatible.
Validation: six CPU integration tests with a tiny real Qwen3 model and pinned TinyEngram source passed, including a constructor guard that forbids dense memory embeddings for exact, hash and historical bundles and checks complete output bytes on known and unseen prefixes. The full local suite passed: 256 tests, 44 skipped (212 executed). Commands:
These fixtures verify loading and addressing, not compression, model quality or measured RSS/latency on the trained research checkpoints. Backbone loading, Python key dictionaries, file-backed metadata and allocator RSS remain costs; source export still loads dense source rows and its validation keeps reference/native models together. Real-checkpoint capacity and query measurements remain outstanding.