Explore the research collection
1 entry · Follow this search
- Paper
Real Long-Term Memory for AI: A 50-Million-Token Window That Is Faster and Cheaper Than Recompute
Corbenic AI's Sietse Schelpe reports a serving-side "long-term memory" layer for frozen LLMs: the public package galahad-kv, loaded into vLLM 0.31.0 via a KV-transfer plug-in, writes each ~16,000-token block's KV state to encrypted local NVMe (MRLNCRY1 format, AES-256-GCM) on first processing and later restores it byte-exact with zero recompute; only one block is ever resident, so GPU memory stays flat. On 50,000,000 tokens of real public text (3,125 blocks; WildChat/code/arXiv/FineWeb-Edu mix, mutated against pretraining contamination) served on a single NVIDIA H100: all 100 probed blocks restored from the encrypted store with no recompute at every depth from 0 to ~49.5M tokens, on both Gemma 4 12B (bf16) and Gemma 4 31B (FP8). A restore is 2.8×/4.3× faster than recomputing the same block (0.266s vs 0.760s; 0.347s vs 1.475s) and uses 8.8×/12.3× less GPU energy, with restore latency depth-independent. On facts planted millions of tokens earlier (with same-format decoys), the 12B model answered 82/100 and the 31B 98/100, with zero hallucinations and zero fabrications on 20 negative controls. Store: 1.86 TB (12B, 36.4 KiB/token) and 6.25 TB (31B FP8, 134 KiB/token) — the small footprint leans partly on Gemma 4's mostly sliding-window attention, which the paper notes it benefits from rather than introduces. The evaluation follows a cheat-resistant protocol (blind ingest, per-block needles, decoys, encrypted-store audit, separate engine-vs-model metrics). Limitations are explicit: this is KV reuse at any depth, not a wider attention window — one block is resident and restored on demand, never attended jointly; there is no learned retrieval; writing is a one-time cost measured at 20,839/10,700 tok/s deposit throughput; the store must be local NVMe.