This companion guide starts from the video NCM vs Plain LLM: Give Your Local AI a Memory and adds grounded detail from the NCM repo, its results file, and the shipped example code. Watch the video first for the full narrated walkthrough, then use the sections below as the written reference. Every section keeps In the video claims apart from Added from the sources research. Readers comparing memory approaches should also see the earlier Hy-Memory 30B: Memory for Local AI Agents guide, which takes a model-side rather than file-side approach.
What NCM actually is
In the video: Native Cognitive Memory is one Python object plus numpy plus an embedding model of your choice, where you create a Memory at a path, add each turn with a speaker tag, call context with each question to get a dated prompt block, and save it into a single .ncm file, version three npz with atomic writes so a crash cannot corrupt it.
In the video: the memory itself never calls a model, not to store and not to retrieve, with the default embedder being the tiny all-MiniLM-L6-v2, swappable for bge-small, bge-base, or any callable, plus an opt-in cross-encoder reranker over the top thirty hits for accuracy mode.
In the video: batch helpers cover add-many, OpenAI-style message lists, new-session markers, and recall with a top-k, and the shipped chat pattern names the assistant Mira with a system prompt of persona plus mood plus dated neighbors oldest first, storing each reply too.
Added from the sources: the NCM repo documents the API, the beagle example, and the results tables in its README, the results file covers method and confidence intervals, and the shipped chat example runs an Ollama qwen2.5:3b loop, all checked October 2026 against a local clone at commit 98651bb whose API surface of Memory, embedder, add, recall, context, save, mood, persona, new-session, and forget was verified on disk.
Plain LLM amnesia versus memory, measured
In the video: the same reader everywhere is qwen2.5:3b, scored on token F1 over four hundred LoCoMo plus two hundred LongMemEval questions, where nothing in the prompt scores repo-reported .043 and .095, total amnesia as expected, NCM version one reaches .184 and .217, plain cosine vector search hits .214 and .224, and NCM version two context reaches .289 and .293, so the only difference is what got pasted into the prompt.
The plain-LLM-fails-cold chapter card: nothing in the prompt, .043 and .095 F1, same 3B same questions (Still from the walkthrough video.)
In the video: the canonical README example stores one line, adopting a beagle called Max, and sessions later the persona line, the mood line, and the dated memory with its neighboring turn come back oldest first, with repo-reported persona accuracy after five sessions of ninety percent for NCM context against eighty-seven for plain vector search, eighty-six point nine for raw recall, and fifty-nine for the sliding window of the last ten turns most bots keep.
Added from the sources: the repo notes these end-to-end runs used a 4-bit KV-cache Ollama install that corrupts output and lowers absolute scores, so treat the absolute F1 values as depressed while the ordering of version one below cosine below version two holds, checked October 2026.
Added from the sources: on self-facts the repo reports NCM at 48.1 percent against 46.5 for an eighteen-hit vector baseline and 9.3 with nothing, and on user-fact questions under a Gemini judge it reports NCM plus reranker at 79.4 and 83.8 percent for 3B and 7B readers against oracle scores of 79.7 and 87.5, all repo-reported with no independent verification.
How retrieval works and the version-one lesson
In the video: inside recall, ranking is relevance only, where every memory carries a dense vector plus BM25 postings for exact names and numbers, NCM z-scores both, adds three quarters of the keyword score to the dense score, then applies a backward-contiguity lift so a strong hit raises the turn before it, because conversations answer the thing just said.
In the video: emotion and age never touch ranking and only decide what gets kept when the store fills up, and that separation is the whole version-two lesson, since version one ranked with four channels of semantic, emotion, state, and recency and measured worse than plain cosine.
In the video: recall at five on LoCoMo-1531 and LongMemEval-S-479 runs repo-reported version one .278 and .497, cosine alone .360 and .575, BM25 alone .506 and .683, NCM version two .555 and .735, and version two plus reranker .657 and .812, so feeling-aware ranking lost to keyword search and relevance won.
The version-one-lesson chapter card: retrieval recall tables and bar charts from the repo README results section (Still from the walkthrough video.)
Added from the sources: the results file is the cited home of the method and confidence intervals behind these tables, so readers should check the video reading against that file, and the engine numbers are repo-reported at 0.6ms recall at one thousand memories and 12ms at one hundred thousand on laptop CPU with no model calls in the store or retrieve path.
Forgetting on purpose and the big-model check
In the video: NCM forgets the least active five percent as the store fills, weighted by uses, age, and salience, with self-talk about the user decaying slower, and replaying roughly five-hundred-turn histories into a store capped at a quarter of max items lifts repo-reported answer-in-prompt rates from forty-two to fifty-two point seven percent, 3B-correct answers from thirty point nine to forty-three point one, and changed facts from thirty-two to sixty-three percent.
In the video: against pasting the entire history the capped memory wins while the full paste costs thirty-six times the tokens at four times the latency, scoring repo-reported .344 against .406, so the smaller prompt gives the better answers.
In the video: the repo volunteered its memory as a provider inside the independent MemoryBench harness against that harness own RAG baseline, scoring repo-reported eighty-four point eight percent against eighty-two point two over all five thousand three hundred twenty-nine questions with the gap concentrated in conversational memory at ninety-five point five versus ninety-two point three, and the cost line of four dollars forty-three versus thirty-five eighty-three because NCM needs no model calls to store memories.
Added from the sources: the smaller harness deltas the repo reports are LoCoMo-1986 at 70.4 versus 68.5 and LongMemEval-500 at 80.6 versus 79.4 with wide p-values, and the large-model LoCoMo run at 68.6 percent judged correct with F1 .537, 12ms retrieval, and sixty-five cents, so readers should treat the headline deltas as repo-reported and the near-tie splits as noise, checked October 2026.
Install it on your homelab box
In the video: the order of operations is pulling qwen2.5:3b in Ollama, cloning the repo, installing with the embed extra, and running the shipped examples/chat.py, a character that remembers you across sessions on your own hardware, with one .ncm file per user, bge when sharper vectors are wanted, and the reranker flag for accuracy mode.
The install-on-your-box chapter card: pull 3B, run chat, one file per user (Still from the walkthrough video.)
Added from the sources: the install recipe above is docs-standard per the Prag research notes and the NCM repo, but every step in this section is untested here since no live install was run for this episode, so verify the pip install -e with embed extra and the chat script against the repo during a real deploy.
Added from the sources: no LICENSE file ships in the repo and no license field was found in the packaging as of the checked clone, so reuse terms are unconfirmed and permission is not implied, with the on-screen repo screenshots treated as fair-use captures only.
Honest caveats, fit, and verdict
In the video: every number in the episode is repo-reported with no independent verification, repo-tuned defaults with no clean held-out, and mostly single runs, while benchmarks are English-only, the mood and persona detectors are English patterns, and mood is a soft signal a 7B model uses but a 3B barely touches.
In the video: contradictions are never resolved inside the memory, since context dates and orders statements so the reader can tell newest from oldest, but a small reader still reports the stale value of a changed fact about one time in four, more context hurts small models, and a 3B character still invents an answer about half the time instead of admitting it forgot.
In the video: this fits anyone running a local companion, a homelab agent, or a character bot on Ollama that currently greets its owner like a stranger every morning, with numpy at query time, no GPU needed for retrieval, and the existing model doing the talking, while anyone on Mem0 or a plain vector sidecar gets the exact repo-reported deltas to beat.
Added from the sources: nothing in this guide was tested against a live memory here, so treat commands, version pins, and benchmark tables as repo-verified starting points from the sources linked above and check the reading against the results file before building on it.