Skip to content

Open native Qwen memory without a temporary dense row table - #57

Merged
initial-d merged 1 commit into
mainfrom
codex/native-direct-reopen
Nov 9, 2026
Merged

initial-d merged 1 commit into
mainfrom
codex/native-direct-reopen

Conversation

@initial-d

Copy link
Copy Markdown
Owner

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:

MEFT_COUNTERFACT_SOURCE="$PWD/artifacts/identity-native-check-20261108/upstream" OMP_NUM_THREADS=1 HF_HUB_OFFLINE=1 artifacts/identity-native-check-20261108/env/bin/python -m unittest tests.test_counterfact_native -v
MEFT_COUNTERFACT_SOURCE="$PWD/artifacts/identity-native-check-20261108/upstream" OMP_NUM_THREADS=1 HF_HUB_OFFLINE=1 artifacts/identity-native-check-20261108/env/bin/python -m unittest discover -s tests

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.

@initial-d
initial-d merged commit b4b2144 into main Nov 9, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant