Skip to content

Source paper

MemOnce: A Scalable Memory Architecture for Large Language Models

Chang Nie, Chaoyou Fu, Songlin Liu and 2 more

Chang Nie, Chaoyou Fu, Songlin Liu, Yiqing Hu, Caifeng Shan

arXiv 2611.27973 · 202626 upvotes on Hugging Face

Research ideas from this paper (3)

Generated by AI. The paper’s authors did not write these.

AI summary

MemOnce introduces a scalable foundation memory architecture for large language models that maintains reusable memory states without linear memory growth or quadratic prefill complexity. It compresses context by caching a small subset of final-layer hidden states as global memory representations and decodes them on-demand via lightweight MLPs into multi-layer key-value caches. By computing query-conditioned sparse attention routing indices only once across all layers, MemOnce maintains a constant active memory cache footprint and achieves linear-time inference while outperforming full-context baselines.

How it works (AI summary)

MemOnce uses a hybrid backbone combining gated delta linear blocks with memory sparse attention layers. The Memory Encoder-Decoder maintains a persistent global memory bank by caching the trailing 1/r final-layer hidden states of each context segment, which are dynamically projected via layer-specific MLPs into key-value caches during generation. Memory Sparse Attention uses a single-shot indexing mechanism based on query-to-memory terminal token similarity to retrieve the top-K relevant memory chunks once per query, concatenating them with a short-term sliding window to bound the active GPU memory state to O(CD).