Enhancing Long-term RAG Chatbots with Psychological Models of Memory Importance and Forgetting
Paper β’ 2409.12524 β’ Published
Fine-tuned roberta-large that predicts valence and arousal of a text (2-output regression), trained on EmoBank.
This model is part of LUFY β a RAG chatbot that selectively forgets unimportant conversations β where it estimates the emotional intensity of conversation turns as one signal of memory importance. See the paper: Enhancing Long-term RAG Chatbots with Psychological Models of Memory Importance and Forgetting.
The companion conversation dataset is at RuiSumida/LUFY (dataset).
best_roberta_large.pth β PyTorch state_dict for RobertaForSequenceClassification (num_labels=2, outputs [valence, arousal])import torch
from huggingface_hub import hf_hub_download
from transformers import RobertaTokenizer, RobertaForSequenceClassification
model = RobertaForSequenceClassification.from_pretrained("roberta-large", num_labels=2)
model_path = hf_hub_download(repo_id="RuiSumida/LUFY", filename="best_roberta_large.pth")
model.load_state_dict(torch.load(model_path, map_location="cpu"))
model.eval()
tokenizer = RobertaTokenizer.from_pretrained("roberta-large")
enc = tokenizer("I can't believe we won the finals!", max_length=128,
padding="max_length", truncation=True, return_tensors="pt")
with torch.no_grad():
valence, arousal = model(**enc).logits.squeeze()
If you use this model, please cite the LUFY paper: https://arxiv.org/abs/2409.12524
Base model
FacebookAI/roberta-large