Tag
This paper presents NGM, a plug-and-play training-free memory module for LLMs that uses a Causal N-Gram Encoder and Cosine-Gated Memory Injector to improve performance on code generation and knowledge-intensive tasks without additional training.
NGM is a training-free, plug-and-play memory module for LLMs that enhances performance by using pretrained token embeddings for N-gram knowledge retrieval without additional training or retrieval pipelines, achieving gains of up to 3 points on code generation and knowledge tasks.