MemOnce stores compact LLM memory and rebuilds KV caches on demand
Original title: MemOnce: A Scalable Memory Architecture for Large Language Models
Adapting Qwen3.5-4B cuts the memory-state cache 1313 times and prefill latency 6.9 times at 1 million tokens.
MemOnce is a language-model architecture meant to keep reusable memory for long and continual interactions without a full token-level KV cache. A memory encoder-decoder stores a small subset of final-layer hidden states and decodes them back into KV caches, while sparse attention retrieves relevant memories with indices computed once across layers. The paper says this yields linear-time complexity and a smaller GPU footprint, and that MemOnce beats Transformers and other architectures across sizes, context lengths, and pretraining or post-training. Adapting Qwen3.5-4B is reported to cut memory-state cache by 1313 times and prefill latency by 6.9 times at 1M context, raise throughput 3.5 times, and improve overall memory performance by 5.77%.
- Only a small subset of final-layer hidden states is cached as memory.
- Sparse memory indices are computed once and reused across layers.
- Qwen3.5-4B adaptation is the reported 1M-context efficiency case.
- The paper also reports zero-shot results on downstream representation tasks.
- Products
- MemOnce
- AI models
- Qwen3.5-4B
From the original article
1 min read at huggingface.coDeploying 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.
By Chang Nie, Chaoyou Fu, Songlin Liu · huggingface.co
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.