{"slug": "memonce-scalable-llm-memory-with-one-kv-decode-per-query", "title": "MemOnce: Scalable LLM Memory With One KV Decode Per Query", "summary": "Researchers Chang Nie, Chaoyou Fu, Songlin Liu, Yiqing Hu and Caifeng Shan posted arXiv paper 2611.27973 on November 20, 2026, introducing MemOnce, an open architecture that caches only a small trailing subset of final-layer hidden states in one global memory bank and projects retrieved states back into per-layer KV on demand. On adapted Qwen3.5-4B at 1M tokens, the authors report a roughly 1,313× smaller active memory state cache, 6.9× faster prefill and +5.77% on their long-memory benchmark average, with code released in the GitHub repo Clare-Nie/MemOnce. The design pairs a memory encoder-decoder with memory sparse attention that computes relevant slots once and reuses the same sparse indices across layers, alternating linear-time Gated DeltaNet blocks with MemOnce attention blocks to avoid the linear GPU memory growth of full KV caches.", "body_md": "**MemOnce is a new open research architecture for long-horizon language models** that tries to escape the **linear GPU memory growth** of classic **[KV caches](https://explainx.ai/blog/what-is-kv-cache-llm-inference-explained-guide-2026)** without giving up the **fine-grained recall** people expect from full attention. **[arXiv 2611.27973](https://arxiv.org/abs/2611.27973?ref=explainx)**, posted **November 20, 2026** by **Chang Nie**, **Chaoyou Fu**, **Songlin Liu**, **Yiqing Hu**, and **Caifeng Shan** (Nanjing University and University of Science and Technology of China affiliations per [arXiv](https://arxiv.org/abs/2611.27973?ref=explainx) and [Hugging Face Papers](https://huggingface.co/papers/2611.27973?ref=explainx)), ships with a **[project page](https://clare-nie.github.io/MemOnce/?ref=explainx)** and **[GitHub repo Clare-Nie/MemOnce](https://github.com/Clare-Nie/MemOnce?ref=explainx)**. The headline systems claim: at **1M tokens** on adapted **Qwen3.5-4B**, **~1,313×** smaller active memory state cache, **6.9×** faster prefill, and **+5.77%** on their long-memory benchmark average—**author-reported** numbers you should treat as **reproducibility targets**, not vendor SLAs.\n\n## TL;DR: the two mechanisms\n\n| Piece | What it does | Why it matters | \n|---|---|---|\n| **Memory encoder-decoder** | Caches only a **small trailing subset** of**final-layer hidden states** in one**global memory bank** , then**projects** retrieved states back into**per-layer KV** when an attention block needs them | Avoids storing **L layers × T tokens** of KV for the full history | \n| **Memory sparse attention** | For each new continual input, computes **which memory slots matter once** , then**reuses the same sparse indices across layers** | Stops every layer from re-scanning the entire past at full density | \n| **Hybrid backbone** | Alternates **linear-time blocks** (paper cites**Gated DeltaNet** ) with**MemOnce attention blocks** | Blends **cheap local mixing** with**selective recall** | \n\nThe slogan on the project page—**write once, index once, decode on demand**—is the implementation story in one line.\n\n## Why builders are looking past \"just buy more HBM\"\n\nLong-context agent ribbon passing through a window, illustrating MemOnce memory pressure on agent harnesses\n\nAgent harnesses that loop for hours—[Codex jobs](https://explainx.ai/blog/mobile-agent-testers-claude-code-github-actions-parallel-qa-november-2026), support bots, coding CLIs—hit the same wall **[vLLM versus SGLang](https://explainx.ai/blog/vllm-vs-sglang-inference-server-comparison-2026)** customers debate daily: **context length** is not free. Every token in history adds **KV tensors** across **every attention layer**. Prefill cost scales **quadratically** in the naive attention case, and **decode** keeps rereading that cache.\n\nResearch teams attack that bottleneck from several angles. **[Zyphra ZHA](https://explainx.ai/blog/zyphra-zha-hierarchical-attention-subquadratic-tree-indexer-qwen3-6-35b-ruler-modeled-speedups-2026)** sparsifies which keys each query sees. **[NVIDIA sparse attention co-design](https://explainx.ai/blog/nvidia-sparse-attention-co-design-long-context-inference-november-2026)** chases hardware-aligned sparsity. MemOnce is another entry: **learned memory states** plus **structured sparsity**, aimed at **native memory** inside the model rather than only **external retrieval**.\n\nIf you run **[multi-day agent evaluations](https://explainx.ai/blog/hugging-face-agentic-evaluation-guide-harbor-november-2026)**, the interesting question is whether MemOnce's **bounded cache** changes **dollars per successful task** more than a **bigger GPU** does.\n\n## Architecture walkthrough\n\nThe **[MemOnce project page](https://clare-nie.github.io/MemOnce/?ref=explainx)** breaks training and inference into three public steps:\n\n1. **Write — cache memory only once.** Only**final-layer** hiddens for a**short tail** enter the**global bank** . Earlier layers never keep their own duplicate token caches for the whole transcript.\n2. **Index — retrieve once per query.** Given a new user or tool message, MemOnce scores memory slots**one time** and fixes**sparse indices** for that turn.\n3. **Read — decode KV on demand.** Retrieved vectors**expand** into the**key/value tensors** each attention layer consumes, while much of the**backbone stays frozen** during adaptation experiments.\n\nThe paper argues this coupling yields **linear-time complexity** in their setup and a **constant GPU memory budget** for the **active** memory state, as opposed to **unbounded KV growth**.\n\nMemOnce pretraining benchmark table comparing Transformers, GDN, and MemOnce at 400M scale\n*Image: [Chang Nie et al., MemOnce project](https://clare-nie.github.io/MemOnce/?ref=explainx)*\n\n### Pretraining from scratch (FineWeb-Edu)\n\nOn roughly **400M-parameter** runs, MemOnce posts **validation perplexity 10.77** at compression ratio **r = 1** and **10.89** at **r = 8**, beating a **365M Transformer** baseline at **10.97** in the public table. Against **Gated DeltaNet (GDN)** and **YOCO**, MemOnce claims **better average zero-shot scores** on eight reasoning-style tasks while using **64× depth–time cache compression** with **under 0.3%** accuracy loss between **r = 1** and **r = 8** in their scaling chart narrative.\n\nThose are **pretraining** results, not a productized **Qwen** drop. They matter because they show the stack is meant as a **foundation architecture**, not only a **LoRA bolt-on**.\n\n## Long-context memory adaptation on Qwen3.5\n\nThe more product-facing section adapts **Qwen3.5-2B** and **4B** \"full context\" baselines to MemOnce and tests **MemBench**, **LoCoMo**, **LongMemEval**, and **PersonaMem** out to **~1M tokens** on the hardest persona split.\n\n| Model | Overall long-memory average (project table) | Delta vs full-context baseline | \n|---|---|---|\n| Qwen3.5-4B full context | 54.30% | — | \n| MemOnce-4B (authors) | 60.07% | **+5.77 points** | \n| Qwen3.5-2B full context | 49.33% | — | \n| MemOnce-2B (authors) | 51.17% | **+1.84 points** | \n\nThe authors position MemOnce as the **first native memory model** in their comparison set to **beat** the **full-context Qwen** baseline on that average, ahead of **M+**, **Metis**, **δ-Mem**, and **EvoEmbedding** in the same table. Independent labs have not yet published conflicting numbers on Hugging Face or Hacker News as of this writing.\n\n## Systems numbers at 1M context\n\nMemOnce inference scalability chart showing KV cache reduction and prefill speed at 1M context\n*Image: [Chang Nie et al., MemOnce project](https://clare-nie.github.io/MemOnce/?ref=explainx)*\n\nThe project page's **inference scalability** panel is what most **infra engineers** will screenshot:\n\n| Metric (Qwen3.5-4B + MemOnce, 1M context) | Claim on project page | \n|---|---|\n| Active GPU memory state cache | **~25 MB** ,**1,313×** smaller than compared baseline | \n| Prefill latency | **6.9×** faster | \n| Decoding throughput | **3.5×** higher (**29.3 tok/s** cited) | \n| Retrieval plus KV decode overhead | **64.2 ms** end-to-end in one table row | \n\nMap those against how you already budget **[speculative decoding](https://explainx.ai/blog/what-is-speculative-decoding-llm-inference-guide-2026)** and **[prefix caching](https://explainx.ai/blog/what-is-kv-cache-llm-inference-explained-guide-2026)** on the same GPUs. MemOnce is **not** a drop-in flag on **vLLM** today; it is a **research codebase** you would integrate only after reading their **hybrid block** schedule.\n\n### How MemOnce compares to other KV research lines on this blog\n\nSeveral 2026 papers attack the same **GPU footprint** problem with different geometry. **[Multi-Branch Transformer Joint-KV](https://explainx.ai/blog/multi-branch-transformer-joint-kv-mbt-uiuc-2026)** shares keys across branches to deduplicate storage. **[NVIDIA's compaction study](https://explainx.ai/blog/nvidia-you-dont-need-long-context-compaction-sssm-arxiv-november-2026)** argues many agent traces can **summarize away** without quality loss. MemOnce instead **learns a memory bank** and **rehydrates KV only where attention fires**, which is closer to **native recurrent memory** than to **post-hoc summarization**. None of these are interchangeable flags; each needs **your workload trace**—codegen sessions look different from **PersonaMem** personas.\n\nIf you teach long-context design in a **[workshop cohort](https://explainx.ai/workshops)**, use MemOnce as a **reading assignment**: ask students to reproduce **one 128K row** and explain whether **sparse indices** stay stable when users **edit earlier messages**. That exercise surfaces whether **agent products** need **retrieval** or **learned memory** first.\n\n## How to try MemOnce this week\n\n1. **Read the paper** —[arXiv PDF](https://arxiv.org/pdf/2611.27973?ref=explainx) for training objectives and ablations.\n2. **Clone the repo** —[github.com/Clare-Nie/MemOnce](https://github.com/Clare-Nie/MemOnce?ref=explainx) for configs; star count was modest on November 24 but the**README and checkpoints** are the gate that matters.\n3. **Reproduce one row** — pick**PersonaMem ~128K** before chasing**1M** ; confirm**GPU model** ,**batch** , and**precision** match the paper before quoting throughput externally.\n4. **Compare honestly** — run the same prompt suite on**dense KV** with your existing**[inference server](https://explainx.ai/blog/vllm-vs-sglang-inference-server-comparison-2026)** so savings are**net of integration tax** .\n\nThe Hugging Face entry includes `arxiv:2611.27973` and `hf papers read 2611.27973` CLI instructions if you pipe papers into local research agents—use your normal **data-handling policy** before sending proprietary chats through any experimental stack.\n\n## Limitations the authors and page imply\n\n- **Scope is memory architecture** , not**tool-use reliability** or**safety alignment** . Better long recall does not fix**bad actions** from agents; pair model work with**[evaluation harnesses](https://explainx.ai/blog/hugging-face-agentic-evaluation-guide-harbor-november-2026)** and policy checks.\n- **1M-token claims** need**your hardware** profile. A**25 MB** active state still sits beside**weights** ,**activations** , and**framework overhead** .\n- **Competing memory papers** land weekly on Hugging Face; MemOnce is one**encode-once** design among**[surveys of memory-centric compression](https://huggingface.co/papers/2610.21165?ref=explainx)** the Librarian bot lists near this entry.\n- **No major lab product** ships MemOnce yet. Contrast with**[frontier sparse attention research](https://explainx.ai/blog/nvidia-sparse-attention-co-design-long-context-inference-november-2026)** that already targets**production stacks** .\n\n## Where MemOnce fits in your roadmap\n\n| If you are building… | MemOnce may help when… | Safer default today | \n|---|---|---|\n| **Personal agents with week-long threads** | You control the **base model** and can**fine-tune** | **RAG + summarization** with audited retrieval | \n| **On-prem long-context chat** | You can **allocate engineering** to**custom inference** | **Quantized KV** and**context pruning** in**[vLLM](https://explainx.ai/blog/vllm-vs-sglang-inference-server-comparison-2026)** | \n| **Research prototypes** | You need a **published baseline** beyond**RMT / Titans** style papers | Start from **arXiv + GitHub** before promising customers**1M** | \n\nNone of that replaces **[workshop training on agent harness design](https://explainx.ai/blog/ai-agent-workshop-formats-prerequisites-how-to-pick-2026)**—architecture papers change **cost curves**, not **operator discipline**.\n\n## What we are watching next\n\n- **Independent replications** on**Hugging Face Spaces** or**GitHub issues** with conflicting throughput numbers.\n- **Integration patches** for**PyTorch** training loops beyond the authors'**Qwen3.5** adaptation recipe.\n- **Downstream embeddings** : the paper claims**zero-shot** representation tasks; if**code or weights** for those heads ship, compare against whichever**embedding endpoint** you already use in production RAG.\n\nWe will add an update if **peer review**, **v2 arXiv**, or **major inference engine** adoption appears.\n\n## Related reading\n\n*Benchmarks and tables follow the MemOnce project page and arXiv 2611.27973 as of November 24, 2026.*", "url": "https://wpnews.pro/news/memonce-scalable-llm-memory-with-one-kv-decode-per-query", "canonical_source": "https://explainx.ai/blog/memonce-scalable-llm-memory-architecture-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-11-24 00:00:00+00:00", "updated_at": "2026-11-24 04:43:26.894937+00:00", "lang": "en", "topics": ["large-language-models", "ai-research", "ai-infrastructure", "machine-learning"], "entities": ["MemOnce", "Chang Nie", "Chaoyou Fu", "Songlin Liu", "Yiqing Hu", "Caifeng Shan", "Qwen3.5-4B", "Gated DeltaNet"], "also_reported_by": [], "takeaway": "MemOnce caches only a short tail of final-layer hidden states in one global memory bank and reuses one set of sparse memory indices across all layers, reporting a ~1,313× smaller active memory state cache, 6.9× faster prefill and +5.77% on its long-memory benchmark at 1M tokens on Qwen3.5-4B.", "recommendation": {"advice": "For long-context serving, test storing only a short tail of final-layer hidden states in a shared memory bank and projecting them back to per-layer KV, reusing one sparse index set across layers instead of keeping full per-layer caches.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/memonce-scalable-llm-memory-with-one-kv-decode-per-query", "markdown": "https://wpnews.pro/news/memonce-scalable-llm-memory-with-one-kv-decode-per-query.md", "text": "https://wpnews.pro/news/memonce-scalable-llm-memory-with-one-kv-decode-per-query.txt", "jsonld": "https://wpnews.pro/news/memonce-scalable-llm-memory-with-one-kv-decode-per-query.jsonld"}}