MemoryBank-SiliconFriend  by zhongwanjun

LLM chatbot with long-term memory, code, and data from research paper

created 2 years ago
309 stars

Top 88.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project introduces MemoryBank, a novel memory mechanism for Large Language Models (LLMs) designed to mimic human memory by selectively reinforcing or forgetting information based on significance and time, inspired by the Ebbinghaus Forgetting Curve. It enables LLMs to access relevant memories, update them continuously, and adapt to user personalities, enhancing long-term companionship. The project also presents SiliconFriend, an empathetic, bilingual chatbot powered by MemoryBank, tuned on psychological dialogs using LoRA.

How It Works

MemoryBank employs a unique updating mechanism inspired by the Ebbinghaus Forgetting Curve, allowing LLMs to manage long-term memory by selectively reinforcing or forgetting information over time. This approach aims to create more natural and adaptive AI interactions. SiliconFriend further enhances this by fine-tuning LLMs (ChatGLM, BELLE, ChatGPT) with LoRA on psychological dialog data, imbuing the chatbot with heightened empathy and the ability to recall past interactions and understand user personality.

Quick Start & Requirements

  • Install: pip install -r requirement.txt
  • Prerequisites: Tesla A100 80GB GPU, CUDA 11.7, Git LFS for model downloads.
  • Models: Requires downloading LoRA checkpoints for ChatGLM and BELLE.
  • API Key: An OpenAI API key is needed for memory summarization and ChatGPT-based dialogs.
  • Setup: Detailed instructions for running CLI and Web demos for ChatGLM, BELLE, and ChatGPT integrations are provided.

Highlighted Details

  • Integrates with both closed-source (ChatGPT) and open-source (ChatGLM, BELLE) LLMs.
  • SiliconFriend demonstrates heightened empathy through LoRA tuning on psychological dialog data.
  • Evaluation includes qualitative analysis with real-world dialogs and quantitative analysis with ChatGPT-generated dialogs.
  • Supports both Chinese and English language interactions.

Maintenance & Community

The project is associated with the paper "MemoryBank: Enhancing Large Language Models with Long-Term Memory" (arXiv:2305.10250). No specific community channels or active maintenance signals are detailed in the README.

Licensing & Compatibility

The README does not explicitly state a license. The code and models are provided for research purposes, and commercial use implications are not detailed.

Limitations & Caveats

The project requires specific, high-end GPU hardware (A100 80GB) and CUDA 11.7, limiting accessibility. An OpenAI API key is mandatory for certain functionalities, introducing external dependency and potential costs. The project appears to be research-focused, and production-readiness or long-term support is not indicated.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
42 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems).

X-LLM by phellonchen

0.3%
312
Multimodal LLM research paper
created 2 years ago
updated 2 years ago
Feedback? Help us improve.