cd /news/large-language-models/memonce-scalable-llm-memory-with-one… · home › topics › large-language-models › article
[ARTICLE · art-175188] src=explainx.ai ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

MemOnce: Scalable LLM Memory With One KV Decode Per Query

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.

recommendation

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.

more in playbook: Inference and self-hosting
by read7 min views4 publishedNov 24, 2026
MemOnce: Scalable LLM Memory With One KV Decode Per Query
Image: Explainx (auto-discovered)

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 without giving up the fine-grained recall people expect from full attention. arXiv 2611.27973, 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 and Hugging Face Papers), ships with a project page and GitHub repo Clare-Nie/MemOnce. 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.

TL;DR: the two mechanisms #

Piece What it does Why it matters
Memory encoder-decoder Caches only a small trailing subset offinal-layer hidden states in oneglobal memory bank , thenprojects retrieved states back intoper-layer KV when an attention block needs them Avoids storing L layers × T tokens of KV for the full history
Memory sparse attention For each new continual input, computes which memory slots matter once , thenreuses the same sparse indices across layers Stops every layer from re-scanning the entire past at full density
Hybrid backbone Alternates linear-time blocks (paper citesGated DeltaNet ) withMemOnce attention blocks Blends cheap local mixing withselective recall

The slogan on the project page—write once, index once, decode on demand—is the implementation story in one line.

Why builders are looking past "just buy more HBM" #

Long-context agent ribbon passing through a window, illustrating MemOnce memory pressure on agent harnesses

Agent harnesses that loop for hours—Codex jobs, support bots, coding CLIs—hit the same wall vLLM versus SGLang 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.

Research teams attack that bottleneck from several angles. Zyphra ZHA sparsifies which keys each query sees. NVIDIA sparse attention co-design 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.

If you run multi-day agent evaluations, the interesting question is whether MemOnce's bounded cache changes dollars per successful task more than a bigger GPU does.

Architecture walkthrough #

The MemOnce project page breaks training and inference into three public steps:

  1. Write — cache memory only once. Onlyfinal-layer hiddens for ashort tail enter theglobal bank . Earlier layers never keep their own duplicate token caches for the whole transcript.
  2. Index — retrieve once per query. Given a new user or tool message, MemOnce scores memory slotsone time and fixessparse indices for that turn.
  3. Read — decode KV on demand. Retrieved vectorsexpand into thekey/value tensors each attention layer consumes, while much of thebackbone stays frozen during adaptation experiments.

The 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.

MemOnce pretraining benchmark table comparing Transformers, GDN, and MemOnce at 400M scale

*Image: [Chang Nie et al., MemOnce project](https://clare-nie.github.io/MemOnce/?ref=explainx)*

### Pretraining from scratch (FineWeb-Edu)

On 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.

Those 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.

Long-context memory adaptation on Qwen3.5 #

The 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.

Model Overall long-memory average (project table) Delta vs full-context baseline
Qwen3.5-4B full context 54.30% —
MemOnce-4B (authors) 60.07% +5.77 points
Qwen3.5-2B full context 49.33% —

| MemOnce-2B (authors) | 51.17% | +1.84 points | The 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.

Systems numbers at 1M context #

MemOnce inference scalability chart showing KV cache reduction and prefill speed at 1M context

Image: Chang Nie et al., MemOnce project The project page's inference scalability panel is what most infra engineers will screenshot:

Metric (Qwen3.5-4B + MemOnce, 1M context) Claim on project page
Active GPU memory state cache ~25 MB ,1,313× smaller than compared baseline
Prefill latency 6.9× faster
Decoding throughput 3.5× higher (29.3 tok/s cited)
Retrieval plus KV decode overhead 64.2 ms end-to-end in one table row

Map those against how you already budget speculative decoding and prefix caching 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.

How MemOnce compares to other KV research lines on this blog

Several 2026 papers attack the same GPU footprint problem with different geometry. Multi-Branch Transformer Joint-KV shares keys across branches to deduplicate storage. NVIDIA's compaction study 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.

If you teach long-context design in a workshop cohort, 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.

How to try MemOnce this week #

  1. Read the paper —arXiv PDF for training objectives and ablations.
  2. Clone the repo —github.com/Clare-Nie/MemOnce for configs; star count was modest on November 24 but theREADME and checkpoints are the gate that matters.
  3. Reproduce one row — pickPersonaMem ~128K before chasing1M ; confirmGPU model ,batch , andprecision match the paper before quoting throughput externally.
  4. Compare honestly — run the same prompt suite ondense KV with your existing**inference server** so savings arenet of integration tax .

The 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.

Limitations the authors and page imply #

  • Scope is memory architecture , nottool-use reliability orsafety alignment . Better long recall does not fixbad actions from agents; pair model work with**evaluation harnesses** and policy checks.
  • 1M-token claims needyour hardware profile. A25 MB active state still sits besideweights ,activations , andframework overhead .
  • Competing memory papers land weekly on Hugging Face; MemOnce is oneencode-once design among**surveys of memory-centric compression** the Librarian bot lists near this entry.
  • No major lab product ships MemOnce yet. Contrast with**frontier sparse attention research** that already targetsproduction stacks .

Where MemOnce fits in your roadmap #

If you are building… MemOnce may help when… Safer default today
Personal agents with week-long threads You control the base model and canfine-tune RAG + summarization with audited retrieval
On-prem long-context chat You can allocate engineering tocustom inference Quantized KV andcontext pruning in**vLLM**
Research prototypes You need a published baseline beyondRMT / Titans style papers Start from arXiv + GitHub before promising customers1M

None of that replaces workshop training on agent harness design—architecture papers change cost curves, not operator discipline.

What we are watching next #

  • Independent replications onHugging Face Spaces orGitHub issues with conflicting throughput numbers.
  • Integration patches forPyTorch training loops beyond the authors'Qwen3.5 adaptation recipe.
  • Downstream embeddings : the paper claimszero-shot representation tasks; ifcode or weights for those heads ship, compare against whicheverembedding endpoint you already use in production RAG.

We will add an update if peer review, v2 arXiv, or major inference engine adoption appears.

Benchmarks and tables follow the MemOnce project page and arXiv 2611.27973 as of November 24, 2026.

── more in #large-language-models 4 stories · sorted by recency
── more on @memonce 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/memonce-scalable-llm…] indexed:0 read:7min 2026-11-24 · —