This work introduces MemOnce, a foundation architecture that learns scalable memory states for language models and outperforms Transformers and other architectures across varying model sizes, context lengths, and training paradigms (pretraining and post-training adaptation).
Abstract
Deploying large language models (LLMs) in long-horizon and continual interactions requires maintaining reusable memory states for future inference, posing challenges for existing architectures. Standard Transformers accumulate layer-wise, token-level KV caches, incurring linear GPU memory growth and quadratic computational complexity as the context expands. In contrast, linear-time architectures compress history into fixed-size states, but struggle to retain fine-grained details. We introduce MemOnce, a foundation architecture that learns scalable memory states for language models. MemOnce is based on two core designs: (a) Memory encoder-decoder: it caches only a small subset of final-layer hidden states as compact memory representations and dynamically decodes them back into KV caches for attention layers; (b) Memory sparse attention: for each continual input, MemOnce adaptively retrieves relevant memory representations, with the sparse indices computed only once across layers. Coupling these two designs enables efficient on-the-fly memory loading and KV cache decoding, drastically reducing the GPU memory footprint and achieving linear-time complexity. We conduct extensive experiments to show that MemOnce outperforms Transformers and other architectures across varying model sizes, context lengths, and training paradigms (pretraining and post-training adaptation). In particular, adapting Qwen3.5-4B with MemOnce reduces memory state cache by 1313$\times$ and prefill latency by 6.9$\times$ at 1M context, and improves throughput by 3.5$\times$ and overall memory performance by +5.77%. Finally, MemOnce generalizes zero-shot to downstream representation tasks, achieving competitive results against specialized models.
SEED makes the prefill shallow in depth and the decode state shallow in representation, and proves that the open-loop error of the periodic compressions back to low rank is bounded independently of their number.
Ming-Yuan Ma, Yang-Min Li, H. Nover et al.· 1 citation
FPDT democratizes long sequence training, making it accessible on mobile and commodity hardware, such as high-end local machines, and trains contexts up to 16x longer than prior sequence-parallel baselines on the same hardware.
Jing-Han Yao, Sam Ade Jacobs, Masahiro Tanaka et al.· GetMobile Mobile Computing a...· 0 citations
UlaCache is presented, a KV cache management system that provides unified logical addressing across GPU and CPU memory that reduces the overhead of KV replacement by parallelizing recency updates and eviction-candidate selection within a GPU memory pool shared across requests.
Large language models (LLMs) are increasingly deployed as persistent services that must reason over large volumes of external knowledge. Retrieval-augmented generation (RAG) grounds model responses in relevant documents, but the retrieved content must still be encoded and stored in the key-value (KV) cache. As this con...
Yuanhong Chen, Yi-Ping Ji, Cameron Gordon et al.· 0 citations
Long-context capability has become essential for large language models (LLMs) to handle complex tasks, yet continuously expanding the context window does not remove the computational, storage, and information-selection pressures incurred at inference time. Existing work on prompt compression, KV-cache management, effic...
Modern hybrid language models increasingly incorporate recurrent architectures, including gated linear attention and selective state-space models, to improve inference efficiency. While these architectures summarize historical information in fixed-size states, recurrent memory often exhibits substantial low-rank redund...