MemGPT: Towards LLMs as Operating Systems-大模型长记忆解决方案
这是一篇来自伯克利大学的论文,主要针对大模型受限制的上下文,提供了一定解决方案,这里进行了翻译,方便做应用开发/agent开发等场景研发人员进行原理参考
Abstract
Large language models (LLMs) have revolutionized AI, but are constrained by limited context windows, hindering their utility in tasks like extended conversations and document analysis. To enable using context beyond limited context windows, we propose virtual context management, a technique drawing inspiration from hierarchical memory systems in traditional operating systems which provide the illusion of an extended virtual memory via paging between physical memory and disk. Using this technique, we introduce MemGPT (MemoryGPT), a system that intelligently manages different storage tiers in order to effectively provide extended context within the LLM’s limited context window. We evaluate our OS-inspired design in two domains where the limited context windows of modern LLMs severely handicaps their performance: document analysis, where MemGPT is able to analyze large documents that far exceed the underlying LLM’s context window, and multi-session chat, where MemGPT can create conversational agents that remember, reflect, and evolve dynamically through long-term interactions with their users. We release MemGPT code and data for our experiments at https://research.memgpt.ai.
Large language models (LLMs) have revolutionized AI, but are constrained by limited context windows, hindering their utility in tasks like extended conversations and document analysis.
大型语言模型(LLMs)已经彻底改变了人工智能,但受限于有限的上下文窗口,这阻碍了它们在如扩展对话和文档分析等任务中的实用性。
To enable using context beyond limited context windows, we propose virtual context management, a technique drawing inspiration from hierarchical memory systems in traditional operating systems which provide the illusion of an extended virtual memory via paging between physical memory and disk.
为了能够使用超出有限上下文窗口的上下文,我们提出了虚拟上下文管理,这是一种从传统操作系统中的分层内存系统汲取灵感的技术,这些系统通过物理内存和磁盘之间的分页提供扩展虚拟内存的幻觉。
Using this technique, we introduce MemGPT (MemoryGPT), a system that intelligently manages different storage tiers in order to effectively provide extended context within the LLM’s limited context window.
利用这种技术,我们介绍了MemGPT(MemoryGPT),这是一个智能管理系统,能够智能地管理不同的存储层次,以便在LLM有限的上下文窗口内有效地提供扩展上下文。
We evaluate our OS-inspired design in two domains where the limited context windows of modern LLMs severely handicaps their performance: document analysis, where MemGPT is able to analyze large documents that far exceed the underlying LLM’s context window, and multi-session chat, where MemGPT can create conversational agents that remember, reflect, and evolve dynamically through long-term interactions with their users.
我们在两个领域评估了我们受操作系统启发的设计,其中现代LLMs的有限上下文窗口严重限制了它们的表现:文档分析,其中MemGPT能够分析远远超过底层LLM上下文窗口的大型文档;多会话聊天,其中MemGPT可以创建能够记住、反思并通过与用户的长期交互动态发展的对话代理。
We release MemGPT code and data for our experiments at https://research.memgpt.ai.
我们在 https://research.memgpt.ai 上发布了MemGPT代码和我们实验的数据。