mlsanityData to 7 Oct 2026

NGM: A Plug-and-Play Training-Free Memory Module for LLMs

arXiv 2605.16893 ↗First posted 16 May 2026cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Recent studies introduce conditional memory modules that decouple knowledge storage from neural computation, enabling more direct knowledge access. Compared to MoE, which relies on dynamic computation paths, explicit lookup provides a more efficient knowledge retrieval mechanism. However, these approaches still depend on learned memory embeddings, requiring additional training and limiting flexibility. To address this, we propose N-gram Memory (NGM), a training-free, plug-and-play module composed of a Causal N-Gram Encoder and a Cosine-Gated Memory Injector. The Causal N-Gram Encoder directly averages the pretrained token embeddings of the backbone model to construct N-gram representations, thereby eliminating the need to train separate N-gram embeddings from scratch. This design requires neither an additional memory table nor a retrieval pipeline. The Cosine-Gated Memory Injector then uses a non-parametric cosine gate with ReLU to modulate the retrieved embeddings into the contextual representations. We evaluate NGM on the Qwen3 series from 0.6B to 14B across eight benchmarks. NGM improves average performance by 0.5 to 1.2 points, with particularly clear gains on code generation and knowledge-intensive tasks (e.g., +3.0 on LiveCodeBench and +3.03 on GPQA for Qwen3-14B). Moreover, NGM also improves performance in multimodal benchmarks (e.g., MMStar +1.53 on Qwen3-VL-2B).

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 31 of its 42 references that are in the map. First posted on arXiv 16 May 2026.

Builds on

31 of 42 references.

References · 31

  1. 2017Attention Is All You Needcited by 59,932
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2025Qwen3 Technical Reportcited by 8,195
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  6. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
  7. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
  8. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
  9. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
  10. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,748
  11. 2025Qwen3-VL Technical Reportcited by 2,534
  12. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
19 more
  1. 2023MMBench: Is Your Multi-modal Model an All-around Player?cited by 2,105
  2. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  3. 2016Enriching Word Vectors with Subword Informationcited by 1,578
  4. 2021Improving language models by retrieving from trillions of tokenscited by 1,278
  5. 2023Instruction-Following Evaluation for Large Language Modelscited by 1,143
  6. 2024Are We on the Right Way for Evaluating Large Vision-Language Models?cited by 893
  7. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
  8. 2023OCRBench: On the Hidden Mystery of OCR in Large Multimodal Modelscited by 466
  9. 2024VLMEvalKit: An Open-Source Toolkit for Evaluating Large Multi-Modality Modelscited by 443
  10. 2024Are We Done with MMLU?cited by 178
  11. 2024Infini-gram: Scaling Unbounded n-gram Language Models to a Trillion Tokenscited by 148
  12. 2023Jump to Conclusions: Short-Cutting Transformers With Linear Transformationscited by 89
  13. 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Modelscited by 78
  14. 2024Understanding Transformers via N-gram Statisticscited by 23
  15. 2025Scaling Embedding Layers in Language Modelscited by 19
  16. 2026Scaling Embeddings Outperforms Scaling Experts in Language Modelscited by 13
  17. 2016Generalizing and Hybridizing Count-based and Neural Language Modelscited by 10
  18. 2026MeKi: Memory-based Expert Knowledge Injection for Efficient LLM Scalingcited by 5
  19. 2026L3: Large Lookup Layerscited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Memory3: Language Modeling with Explicit Memory
  2. 2025MLP Memory: A Retriever-Pretrained Memory for Large Language Models
  3. 2026Knowledge Offloading: Decomposing LLMs into Sparse Backbones and Memory Modules
  4. 2026EngramEdit: Decoupled Knowledge Updates in LLMs through Conditional Memory
  5. 2026TokenMem: Faithful Knowledge Injection for Frozen LLMs
  6. 2025SR-KI: Scalable and Real-Time Knowledge Integration into LLMs via Supervised Attention
  7. 2022An Efficient Memory-Augmented Transformer for Knowledge-Intensive NLP Tasks
  8. 2025Memorization and Knowledge Injection in Gated LLMs