ഓർമ്മ · Local Cognitive Memory Layer · Apache-2.0 · v0.2.6
Remembering
without thinking.
An episode-first memory engine built universally for local open-weight models. Neuroscience dynamics,
Paninian grammar, and deterministic metric math — retrieving in 63.8
ms on a laptop CPU with zero LLM calls.
Notes on moving from neuroscience intuition to a cognitive + computational math hybrid that actually runs on
a normal laptop.
it started out of a very real frustration. i wanted to run small open-weight models — 3B to 8B models like
Llama, Qwen, Mistral, Gemma, or Phi — privately on a regular 16 GB laptop. no cloud API keys, no leaking
months of personal thoughts to someone else's server.
the moment you drop existing memory frameworks onto a local model, everything falls apart. they were
engineered assuming a frontier cloud model on tap and a multi-container graph database. on a laptop, calling
an LLM on every turn just to extract facts freezes chat for 10 seconds, 3B models invert subject-object
graph triples, and asking them to DELETE or UPDATE facts causes accidental amnesia whenever a temporary exception happens.
so i stopped asking "how do we prompt a 3B model harder?" and asked something simpler: how does a human remember where they parked without pausing to
think?
"Episodes are the memory. States are just an index of what is true right now. Retrieval runs with zero LLM
calls in under 100 ms."
neuroscience meets silicon reality
here's the catch i hit early on: you can't copy-paste human wetware
onto a von Neumann laptop. brains run on massively parallel chemistry and embodied senses;
laptops run on CPU caches, SQLite I/O, and matrix math. literal "brain simulations" in software turn slow
and brittle.
instead, Orma finds the ensemble sweet spot — taking behavioral principles from cognitive neuroscience
(Method of Loci, ACT-R decay, Hawkes bursts, Ebbinghaus stability), structural precision from ancient
Paninian formal grammar (Anuvritti pronoun carry-over and Sutra dense bracket encoding),
and executing everything with fast, classical metric-space math.
Fig 1. Live recall never invokes an LLM. Raw episodes are immutable; background sleep extracts verified
states without blocking chat.
universal across every local stack
Orma is never tied to a single model family. Point it at Llama 3.2, Qwen 2.5, Mistral, Gemma, Phi, or
DeepSeek — swap weights anytime while keeping one portable memory file.
Ollamahttp://127.0.0.1:11434/v1OpenAI Proxy /
Up
llama.cpphttp://127.0.0.1:9931/v1Any GGUF
server
LM Studio / vLLM:1234/v1 · :8000/v1Zero-code proxy
Claude Code /
Cursororma mcp (stdio)Native
MCP tools
02 / Deterministic Retrieval
Four stages of math, zero LLM
calls
Select a stage to inspect the exact equation and watch how candidate passages re-rank on CPU.
Stage 00 · Hybrid Recall~12 ms on CPU
Candidate Score
Distribution
Cognitive Activation Dynamics
ACT-R, Hawkes & Ebbinghaus
Memories decay by power-law recency (d=0.5), spike during topical
bursts (30-min Hawkes half-life), and strengthen with spaced rehearsal.
Rehearsals (n)4 accesses
Hawkes Burst (α)1.20
ACT-R Decay (d)0.50
Ai(t) = ln(Σ(t - tk)-d) +
Σαije-β(t - tj) + Si
14-DAY ACTIVATION TRAJECTORYDay 7: 1.84
03 / Failure Modes
Five ways naive memory breaks
Conversation Trajectory
Naive Memory
Orma Deterministic Guard
04 / Evaluation · LoCoMo (1,536
Queries)
Honest numbers on a laptop CPU
Footprint vs. Existing
Systems
Per-Category LoCoMo
Experimental note: Pure Zero-LLM Orma measures deterministic IR
recall without calling an LLM — reaching 28.17% Fuzzy MRR and 46.94% Fuzzy Recall@20 in 63.8 ms
(414 tokens). Background sleep consolidation raises Answer-in-Context from 27.21% → 31.71% (single-hop 20.81%
→ 36.86%) at 56.2 ms CPU median. Open-domain queries
(n=92) remain hard (<10% Answer-in-Context) because they depend on external world knowledge.
Installation, Python SDK, Method of Loci API, MCP server, OpenAI proxy,
CLI, and OrmaConfig (v0.2.6).
No sections matched your filter. Try: pip, mcp, ollama, or mmr.
01. Installation & Requirements
Requires Python 3.10+ on macOS, Linux, or Windows (8–16 GB RAM). On first run, Orma
caches bge-small-en-v1.5 and ms-marco-TinyBERT-L-2-v2 (~133 MB total); afterwards, it operates 100%
offline with a single SQLite WAL file at ~/.orma/memory.db (override via
ORMA_DIR).
# Install from PyPI
pip install orma-ai
# Or with uv
uv pip install orma-ai
# Development & benchmark suite (226 tests)
git clone https://github.com/wizardwithcodehazard/orma.git
cd orma
pip install -e ".[dev]"
python -m pytest tests/ -v
02. Python SDK & Method of Loci API
from orma import Memory, OrmaConfig
mem = Memory(config=OrmaConfig(
enable_mmr=True,
enable_rocchio=True,
enable_rerank=True,
enable_spreading_activation=True,
budget_tokens=4096,
))
mem.observe(role="user", text="My sister Asha has a severe peanut allergy.")
mem.checkpoint(
label="Sprint 3: Auth Migration",
gist="Migrated auth schema v1 -> v2; added foreign keys on user_sessions."
)
ctx = mem.build_context("What snacks should I avoid for Asha?")
walk = mem.walk_palace("auth schema changes", radius=1)
mem.close()
03. Local Runtimes & Serving
04. MCP & Client Integrations
MCP Tool
Behavior
orma_recall(query, space)
Token-budgeted active facts, anti-patterns, and past decisions (<20 ms).
orma_remember(text, kind, role, space)
Stores project rules or decisions; kind="anti_pattern" marks prohibitions.
orma_forbid(rule, space)
Registers a Tier 0 [FORBIDDEN: ...] rule hoisted
to the prompt head.
orma_facts(space, include_history)
Lists active canonical states and optional superseded lineages.
orma_forget(state_id, space)
Closes an obsolete state while keeping lossless episodes intact.
05. CLI Reference
orma add "..." / file.md
Ingest notes, markdown docs, or FORBIDDEN directives.
orma search / recall "q"
Run hybrid search or preview the exact tiered memory block.
orma facts --history
Inspect active states and superseded history chains.
orma sleep --model <m>
Trigger offline sleep consolidation on pending episodes.
orma proxy / up
Serve OpenAI-compatible proxy (:8080/v1) or streaming browser UI.
orma mcp / viz / stats
Run stdio MCP server, launch 3D WebGL connectome, or check DB stats.