用稀疏记忆模块让大模型持续学习,遗忘少、显存低。
Improving Sparse Memory Finetuning
- 基于KL散度选关键参数更新,提升记忆效率
- 在0.5B模型上实现新知识学习,旧能力遗忘率<5%
- 适配消费级显卡,开源可复现
大型语言模型通常训练完成后即固定,但实际应用需持续学习新知识而不丢失原有能力。标准微调方法(如全量微调或LoRA)存在灾难性遗忘问题,因修改共享密集表示导致任务间干扰。稀疏记忆微调(SMF)通过将更新限制在显式记忆层的少数参数中提供替代方案。本文提出一个开源流程,为预训练模型Qwen-2.5-0.5B添加稀疏记忆模块,使其可在消费级硬件上实现有效持续学习。我们引入基于KL散度的理论驱动槽选择机制,优先更新相对于背景分布“信息意外”程度高的词元。实验表明,改造后模型能以极小遗忘率(<5%)获取新事实知识,验证了稀疏更新在实践中的有效性。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are typically static after training, yet real-world applications require continual adaptation to new knowledge without degrading existing capabilities. Standard approaches to updating models, like full finetuning or parameter-efficient methods (e.g., LoRA), face a fundamental trade-off: catastrophic forgetting. They modify shared dense representations, causing interference across tasks. Sparse Memory Finetuning (SMF) offers a promising alternative by localizing updates to a small subset of parameters in explicit memory layers. In this work, we present an open-source pipeline to retrofit existing pretrained models (Qwen-2.5-0.5B) with sparse memory modules, enabling effective continual learning on consumer hardware. We extend prior work by introducing a theoretically grounded slot-selection mechanism based on Kullback-Leibler (KL) divergence, which prioritizes memory updates for informationally "surprising" tokens relative to a background distribution. Our experiments demonstrate that our retrofitted models can acquire new factual knowledge with minimal forgetting of held-out capabilities, validating the sparse update hypothesis in a practical setting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。