LUFY β€” RoBERTa-large valence/arousal predictor

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).

Files

  • best_roberta_large.pth β€” PyTorch state_dict for RobertaForSequenceClassification (num_labels=2, outputs [valence, arousal])

Usage

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()

Citation

If you use this model, please cite the LUFY paper: https://arxiv.org/abs/2409.12524

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for RuiSumida/LUFY

Finetuned
(471)
this model

Paper for RuiSumida/LUFY