Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.04 KB

File metadata and controls

39 lines (29 loc) · 1.04 KB

Re2LLM

This is PyTorch implementation of our AAAI'25 paper [Re2LLM: Reflective Reinforcement Large Language Model for Session-based Recommendation].

Architecture of Re2LLM

image

Prerequisites

  • Python >= 3.6
  • PyTorch == 2.1.0
  • transformers == 4.30.2
  • numpy == 1.24.4
  • openai == 0.28.0
  • gym == 0.21.0

Data Preparation

Reflective Exploration Module

  • Run Reflective Exploration.ipynb

Reinforcement Utilization Module

python PPO_discrete_main.py --savedir {path_to_test_model} --dataset {movie, game}

Testing

  • To test the model and save the LLM output, run the following command:
python test.py --testdir {path_to_test_model (e.g., test_model)} --output {path_to_output} --dataset {movie, game}