The source code is organized as follows:
data
: contains multi-hop open rule dataset.
checkpoint
: contains the model weight files.
data_process
: contains the code for preprocessing dataset.
trl
: contains the utility functions.
gen_openrule.py
: contains the main executable code for genarating open rule.
inference_ppo_gpt.py
: contains the code for testing the performance of gpt after ppo.
inference_reward.py
: contains the code for testing the performance of reward model.
iTrainingLogger.py
: contains the code for loading dataset.
ppo_openrule.py
: contains the code for reinforcement learning of G_net and E_net.
train_gpt.py
: contains the code for training gpt for Generation and Extraction.
train_reward_model.py
: contains the code for training reward model.
pip install -r requirements.txt
python train_gpt.py
python train_reward_model.py
python ppo_openrule.py
python gen_openrule.py