📝 MEMSTORE_CLONE_CHECKPOINT_2026-10-27_2.mdv4.6.0 · 2026-10-19

MEMSTORE CLONE CHECKPOINT 2026-10-27 (2) — Memstore CLOSED, The AI Influence Project OPENS

Operator: Andrew. Written 2026-10-27 02:55 Sydney. Supersedes nothing; follows MEMSTORE_CLONE_CHECKPOINT_2026-10-26_1.md.

1. Decision

The operator closed the memstore chapter and opened The AI Influence Project. Memstore (facts layer) is finished for now. Everything below "Influence" is new work. Start the next conversation from this file.

2. The machine

3. Memstore chapter — what was delivered (all zips delivered to the operator)

Zip Content
v1.0.6 memstore.py 1.1.1 (MEMDIR default /root/memstore, MEMSTORE_DB, prints database path); qwen_propose.py 1.1.1
v1.0.7 qwen_memproxy.py 1.2.0, tool filtering (--drop-tools)
v1.0.8 qwen_memproxy.py 1.2.1, per-profile defaults: 4B drops runtime tools, 0.5B drops all
v1.0.9 qwen_memproxy.py 1.3.0, remember: in chat saves a fact through memstore.py add

Go-between: 8090 → 4B (8080), 8091 → 0.5B (8081). It injects memory, filters tools, handles remember:. Order in forward: filter tools, remember:, inject.

Findings worth keeping:

Known open items in the memstore chapter (not blocking):

4. The AI Influence Project — agreed design

Purpose: a second LLM-side store (the operator's "LLM2 token database") that influences LLM1's next-token probabilities using logit_bias, with saliency read from n_probs.

5. Current state of the code — IMPORTANT

memtok.py v1.0.0 (2026-10-27) is written and tested but NOT packaged or delivered.

Location: scratchpad/b110/memtok.py (the build folder b110 is a copy of b109 plus memtok.py). Not yet done:

Commands: seed, add, prepare, retrieve (auto sync; --record, --top, --min-sim 0.25, --json, --no-sync), bias, hit, list, stats, sync, evict --max N (only fact_id IS NULL and value < 3.0; --dry-run), forget, queries, forget-query.

Tables in memtok.db: memtoks(id, text UNIQUE, token_ids JSON, vec JSON, hits, value, fact_id, origin, created, last_seen); queries(id, text UNIQUE, vec, hits, created, last_seen); query_memtoks(query_id, memtok_id, score).

Note: timestamps are stored in UTC. Weight = value × (1 + ln(hits)); score = max(cosine,0) × weight.

Tests run (stand-in embedding/tokenizer servers, scratch tmt.py, not shipped): seed skips corrections; prepare fills vectors and token IDs; --record stores a query and a repeat raises its count to 2; forget-query removes its links; rejecting a fact in memstore removes its memtok on sync; unreadable memstore refuses to delete anything; memstore.db hash unchanged by memtok commands; bias output. Tested on a newer Python than the Clone's 3.6 — run it on the Clone's Python 3.6 first (it only uses stdlib features that exist in 3.6; utcnow is fine there).

Unrequested decisions made and listed to the operator for the query store: separate queries and query_memtoks tables; storing only with --record; text cap 2000 characters; queries never touched by sync/evict. Still to list before delivery (from the original spec): log-damped count multiplier, --min-sim 0.25, eviction exemptions, one memtok per fact on seed, leading-space tokenisation, phrase-level default.

6. Open questions for the Influence Project

  1. Tokenizer check: are the 4B (8080) and 0.5B (8081) vocabularies identical for these IDs? Run /completion with n_probs: 20 on both and compare ids 311, 728, 32671.
  2. Where bias is applied: logit_bias is per request, not per token. Decide how the go-between feeds it (one pre-computed table at request start vs. step-by-step generation with re-biasing as phrases begin).
  3. Measuring effect: repeat the same request with and without the table and compare n_probs.
  4. Embedding server: which model, which port, pooling type (--pooling mean).
  5. How a memtok's count and value rise in practice (hit after use; what counts as use).
  6. Query store use: what the stored queries and their returned memtoks feed (value updates? evaluation?). Raw queries can hold secrets, so they never become memtoks automatically.

7. Standing operator rules (carry forward)

8. First steps in the new conversation

  1. Say the Memstore chapter is closed and the Influence Project is open.
  2. Finish the memtok.py delivery: manual, listed decisions, Memstore_Clone_v1.1.0.zip (or a new Influence project zip name if the operator prefers), release card.
  3. Operator runs on the Clone: memtok.py seed, then prepare with an embedding server, then retrieve --record.
  4. Work through section 6, starting with the tokenizer check.