Despite their remarkable capabilities, Large Language Models (LLMs) struggle to effectively leverage historical interaction information in dynamic and complex environments. Memory systems enable LLMs to move beyond stateless interactions by introducing persistent information storage, retrieval, and utilization mechanisms. However, existing memory systems often introduce substantial time and computational overhead. To this end, we introduce a new memory system called LightMem, which strikes a balance between the performance and efficiency of memory systems. Inspired by the Atkinson-Shiffrin model of human memory, LightMem organizes memory into three complementary stages. First, cognition-inspired sensory memory rapidly filters irrelevant information through lightweight compression and groups information according to their topics. Next, topic-aware short-term memory consolidates these topic-based groups, organizing and summarizing content for more structured access. Finally, long-term memory with sleep-time update employs an offline procedure that decouples consolidation from online inference. On LongMemEval and LoCoMo, using GPT and Qwen backbones, LightMem consistently surpasses strong baselines, improving QA accuracy by up to 7.7% / 29.3%, reducing total token usage by up to 38x / 20.9x and API calls by up to 30x / 55.5x, while purely online test-time costs are even lower, achieving up to 106x / 117x token reduction and 159x / 310x fewer API calls. The code is available at https://github.com/zjunlp/LightMem.


翻译:尽管大型语言模型(LLMs)展现出卓越的能力,但在动态复杂环境中,它们难以有效利用历史交互信息。记忆系统通过引入持久的信息存储、检索与利用机制,使LLMs能够超越无状态交互。然而,现有记忆系统通常带来显著的时间与计算开销。为此,我们提出一种名为LightMem的新型记忆系统,在记忆系统的性能与效率之间取得平衡。受人类记忆的Atkinson-Shiffrin模型启发,LightMem将记忆组织为三个互补阶段:首先,认知启发的感官记忆通过轻量级压缩快速过滤无关信息,并按主题对信息进行分组;其次,主题感知的短期记忆整合这些基于主题的组,对内容进行组织与摘要,以实现更结构化的访问;最后,采用睡眠时间更新的长期记忆通过离线过程将整合与在线推理解耦。在LongMemEval和LoCoMo基准测试中,基于GPT和Qwen骨干网络,LightMem持续超越强基线模型,将问答准确率最高提升7.7%/29.3%,总令牌使用量最高减少38倍/20.9倍,API调用次数最高降低30倍/55.5倍;而纯在线测试时成本更低,实现了最高106倍/117倍的令牌减少和159倍/310倍的API调用削减。代码已开源:https://github.com/zjunlp/LightMem。

0
下载
关闭预览

相关内容

【CVPR 2021】变换器跟踪TransT: Transformer Tracking
专知会员服务
22+阅读 · 2021年4月20日
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
【NeurIPS2019】图变换网络:Graph Transformer Network
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
LibRec 每周算法:DeepFM
LibRec智能推荐
14+阅读 · 2017年11月6日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
51+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
VIP会员
相关资讯
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
【NeurIPS2019】图变换网络:Graph Transformer Network
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
LibRec 每周算法:DeepFM
LibRec智能推荐
14+阅读 · 2017年11月6日
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
51+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员