MemOnce gives Qwen3.5 a million-token memory in 25 MB of GPU cache

2 days ago

MemOnce adds a compact, retrievable memory to frozen Qwen3.5 models. At a million tokens it keeps 25 MB of cache on the GPU where plain Qwen3.5-4B needs 32 GB, cuts prefill from about 287 s to 41 s, and scores higher than the full-context model on five memory benchmarks. From Nanjing University and USTC, arXiv 2611.27973v1, submitted 20 November 2026.

Ask about this presentation

Chapters

  1. 0:00MemOnce gives Qwen3.5 a million-token memory
  2. 0:13One in eight final-layer states
  3. 0:2425 MB instead of 32 GB
  4. 0:39One lookup per question
  5. 0:54Beats full context on memory
  6. 1:08General skills hold
  7. 1:24Prefill and decoding at 1M
  8. 1:36Where it stops
  9. 1:51Verdict
Show transcript
  1. MemOnce lets a small Qwen3.5 model remember a million tokens of conversation with only 25 megabytes of it on the GPU, and it answers memory questions better than the same model reading everything. It comes from Nanjing University and USTC.

    Slide text
    AI Papers

    MemOnce gives Qwen3.5 a million-token memory in 25 MB of GPU cache

    Chang Nie, Chaoyou Fu, Songlin Liu, Yiqing Hu, Caifeng Shan · Nanjing University, University of Science and Technology of China

    Nie et al. · MemOnce · arXiv 2611.27973v1 · submitted 20 Nov 2026
  2. A normal transformer caches keys and values for every token at every layer. MemOnce keeps only the last eighth of each chunk's final-layer states, and small decoders rebuild a KV cache from them when a question needs it.

    Slide text
    01 02 03 How it works

    It keeps one in eight final-layer states and rebuilds the KV cache from them

    MemOnce architecture: hybrid backbone and memory encoder-decoder
    Nie et al. · MemOnce · arXiv 2611.27973v1 · Section 3.1 · Figure 2
  3. That is what moves memory off the graphics card. At a million tokens, plain Qwen3.5 4B needs about 32 gigabytes of cache on the GPU. MemOnce keeps 25 megabytes there and moves older memory, about 640 megabytes, out to an SSD.

    Slide text
    01 02 03 How it works

    At a million tokens the GPU holds 25 MB of memory, down from 32 GB

    Qwen3.5-4B, full context with MemOnce
    Active GPU cache
    32.05 GB
    Active GPU cache
    25.0 MB

    Older memory moves to SSD or CPU: 640 MB at 1M tokens.

    Nie et al. · MemOnce · arXiv 2611.27973v1 · Table 14 · Qwen3.5-4B at 1M tokens
  4. For each new question, MemOnce picks the best 64 stored chunks once. Every layer and every generated token reuses that pick. With 128,000 tokens of history, the lookup takes about 64 milliseconds, around 12 times faster than the earlier M+ model.

    Slide text
    01 02 03 How it works

    Each question pulls 64 memory chunks once, for every layer

    One lookup per question reused by every attention layer and every generated token
    64 ms at 128K tokens M+ takes 773 ms; a rewrite-then-search RAG pipeline 1.09 s
    Nie et al. · MemOnce · arXiv 2611.27973v1 · Section 3.2 · Table 10
  5. On five memory benchmarks, from 4,000 to a million tokens, the adapted 4B model gets about six more answers in a hundred right than plain Qwen3.5 4B reading everything. The gap is widest at a million tokens, where retrieval filters out unrelated history.

    Slide text
    01 02 03 What it scored

    Qwen3.5-4B with MemOnce beats itself reading the whole history

    Table 3: memory benchmark results
    Nie et al. · MemOnce · arXiv 2611.27973v1 · Table 3 · five memory benchmarks, 4K to 1M tokens
  6. The adapter runs only while memory is written, so Qwen3.5 answers with its own weights. With 32,000 tokens in memory, its MMLU, GSM8K and GPQA scores stay level. EvoEmbedding and Metis, two earlier memory methods, lose around 20 points.

    Slide text
    01 02 03 What it scored

    Qwen3.5’s own weights stay frozen, so its reasoning scores hold

    65.98 MemOnce average, against 65.88 for plain Qwen3.5-4B
    −18 to −23 points lost by EvoEmbedding and Metis
    Nie et al. · MemOnce · arXiv 2611.27973v1 · Table 4 · MMLU, GSM8K, GPQA under a 32K memory load
  7. Reading in a million tokens takes plain Qwen3.5 4B close to five minutes on an H100. With MemOnce it takes about 41 seconds. Generation holds near 29 tokens a second, while the full-context model slows to about 8.

    Slide text
    01 02 03 What it scored

    At a million tokens, prefill drops from 287 s to 41 s

    Qwen3.5-4B, full context with MemOnce
    Prefill, seconds
    286.86 s
    Prefill, seconds
    41.36 s
    Decoding, tokens/s
    8.4
    Decoding, tokens/s
    29.3
    Nie et al. · MemOnce · arXiv 2611.27973v1 · Table 14 · Qwen3.5-4B at 1M tokens, H100
  8. MemOnce has only been fitted to Qwen3.5 at 2 and 4 billion parameters. Long coding sessions and multi-step tool use are untested. Full context still wins on LoCoMo, plain retrieval wins on LongMemEval, and a DeepSeek model grades the open answers.

    Slide text
    01 02 03 Where it stops

    Tested on two Qwen3.5 sizes, and simpler setups still win two benchmarks

    Qwen3.5 2B and 4B only pretraining from scratch stopped at 1B parameters
    Agent work untested long coding sessions and multi-step tool use
    Full context wins LoCoMo 69.6 vs 67.0; plain RAG wins LongMemEval, 52.4 vs 47.4
    Open answers graded by a model DeepSeek-V4.1-Flash judges correctness
    Nie et al. · MemOnce · arXiv 2611.27973v1 · Section 5.2 · Tables 3 and 12 · Section 4.1
  9. I would say yes, if you run Qwen3.5 at 2 or 4 billion parameters, your app re-reads long chat histories every turn, and you can add a 264 megabyte adapter. The limit is that it was measured on memory benchmarks, never inside a working agent. The code is in the MemOnce repository.

    Slide text
    01 02 03 Where it stops

    Worth a try if you run Qwen3.5 on long chat histories

    Nie et al. · MemOnce · arXiv 2611.27973v1 · code and checkpoint from the paper’s repository

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York