Structured Memory for Edge Language Models: Persistent Context and Corpus Retrieval via O(1) SSM State Injection
PRECOG precomputes SSM corpus states and injects them at query time, avoiding context re-ingestion. On a 1.2B edge model, reported prefill fell from about 27 seconds to under 6 ms.
PRECOG encodes documents offline as fixed-size SSM states, retrieves the best match, and injects it at query time. On a **1.2B-parameter** model with a **192 KB hidden state**, prefill dropped from about 27 seconds to **under 6 ms**.
For edge agents with repeated corpus access, benchmark state injection against conventional RAG. The accompanying memory scheme combines episodic, semantic, and retrieved states with **O(1) session initialization** and an adjustable storage-fidelity tradeoff.
PRECOG encodes documents offline as fixed-size SSM states, retrieves the best match, and injects it at query time. On a **1.2B-parameter** model with a **192 KB hidden state**, prefill dropped from about 27 seconds to **under 6 ms**. For edge agents with repeated corpus access, benchmark state injection against conventional RAG. The accompanying memory scheme combines episodic, semantic, and retrieved states with **O(1) session initialization** and an adjustable storage-fidelity tradeoff. The approach depends on SSM architecture and cannot be transferred directly to position-entangled Transformer KV caches. The material says answer quality matched in-context RAG, but gives no task breakdown or evidence across other models and hardware.
This introduces an architecture-specific alternative to repeatedly prefilling retrieved documents: store corpus items as reusable SSM states and inject one at session start. It could materially change edge-agent retrieval economics and memory initialization, while narrowing applicability to compatible SSMs. Claims of RAG-equivalent quality remain provisional without task-level results, cross-model tests, or provenance controls.