FastMem: Fast Memorization of Prompt Improves Context Awareness of Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) excel in generating coherent text, but they often struggle with context awareness, leading to inaccuracies in tasks requiring faithful adherence to provided information. We introduce FastMem, a novel method designed to enhance instruction fine-tuned LLMs' context awareness through fast memorization of the prompt. FastMem maximizes the likelihood of the prompt before inference by updating only the last Feed-Forward Network (FFN) module. This targeted approach ensures efficient optimization without overfitting, significantly improving the model's ability to comprehend and accurately follow the context. Our experiments demonstrate substantial gains in reading comprehension, text summarization and adherence to output structures. For instance, FastMem improves the accuracy of Llama 3-8B-Inst on the NQ-SWAP dataset from 59.1% to 71.6%, and reduces the output structure failure rate of Qwen 1.5-4B-Chat from 34.9% to 25.5%. Extensive experimental results highlight FastMem's potential to offer a robust solution to enhance the reliability and accuracy of LLMs in various applications. Our code is available at: https://github.com/IAAR-Shanghai/FastMem
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 32 of its 46 references that are in the map. First posted on arXiv 23 Jun 2024.
Builds on
32 of 46 references.
References · 32
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023Qwen Technical Reportcited by 3,344
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,470
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
20 more
- 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,317
- 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 812
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
- 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 609
- 2021Editing Factual Knowledge in Language Modelscited by 553
- 2022Self-critiquing models for assisting human evaluatorscited by 380
- 2021Entity-Based Knowledge Conflicts in Question Answeringcited by 356
- 2023Trusting Your Evidence: Hallucinate Less with Context-aware Decodingcited by 327
- 2023Evaluating Verifiability in Generative Search Enginescited by 303
- 2021Understanding Factuality in Abstractive Summarization with FRANK: A Benchmark for Factuality Metricscited by 287
- 2023Inverse Scaling: When Bigger Isn't Bettercited by 207
- 2018WikiHow: A Large Scale Text Summarization Datasetcited by 204
- 2023Transformer-Patcher: One Mistake worth One Neuroncited by 197
- 2021Annotating and Modeling Fine-grained Factuality in Summarizationcited by 131
- 2021CLIFF: Contrastive Learning for Improving Faithfulness and Factuality in Abstractive Summarizationcited by 120
- 2020Factual Error Correction for Abstractive Summarization Modelscited by 108
- 2023Alleviating Hallucinations of Large Language Models through Induced Hallucinationscited by 79
- 2021MT3: Meta Test-Time Training for Self-Supervised Test-Time Adaptioncited by 65
- 2023FactKB: Generalizable Factuality Evaluation using Language Models Enhanced with Factual Knowledgecited by 55
- 2022FactPEGASUS: Factuality-Aware Pre-training and Fine-tuning for Abstractive Summarizationcited by 49
Built on by
Citing papers per year: 2024: 2; 2025: 3; 2026: 2.
7 papers.
- 2024Internal Consistency and Self-Feedback in Large Language Models: A Surveycited by 50
- 2025Jigsaw-R1: A Study of Rule-based Visual Reinforcement Learning with Jigsaw Puzzlescited by 36
- 2025DocPruner: A Storage-Efficient Framework for Multi-Vector Visual Document Retrieval via Adaptive Patch-Level Embedding Pruningcited by 20
- 2026PERMA: Benchmarking Personalized Memory Agents via Event-Driven Preference and Realistic Task Environmentscited by 14
- 2024MINER: Mining the Underlying Pattern of Modality-Specific Neurons in Multimodal Large Language Modelscited by 7
- 2025Beyond Frequency: The Role of Redundancy in Large Language Model Memorizationcited by 0
- 2026DPPM: Dual-Path Parametric Memory for Personalized Language Modelscited by 0
- 2026DPPM: Dual-Path Parametric Memory for Personalized Language Models8 Oct 2026
- 2026PERMA: Benchmarking Personalized Memory Agents via Event-Driven Preference and Realistic Task Environments24 Mar 2026
- 2025DocPruner: A Storage-Efficient Framework for Multi-Vector Visual Document Retrieval via Adaptive Patch-Level Embedding Pruning28 Sep 2025
- 2025Beyond Frequency: The Role of Redundancy in Large Language Model Memorization14 Jun 2025
- 2025Jigsaw-R1: A Study of Rule-based Visual Reinforcement Learning with Jigsaw Puzzles29 May 2025
- 2024MINER: Mining the Underlying Pattern of Modality-Specific Neurons in Multimodal Large Language Models7 Oct 2024
- 2024Internal Consistency and Self-Feedback in Large Language Models: A Survey19 Jul 2024