The official code for Retrospex
pip install -r requirements.txtUse alfworld/IL/train_llama3/run_lora_deepspeed.sh to train the model. You should change the model and dataset path in the script to your own path. And after the training, you can merge the lora part to the base model. Use alfworld/IL/train_llama3/merge.py to merge the model.
The link of the model we trained is : https://huggingface.co/AronXiang/RetrospexLLaMA3. This model is a merged one, you can directly call it by huggingface.
Run ScienceWorld/IL/fast_agent/ds_train.sh to train the flan t5 large model.
The link of the model we trained is : https://drive.google.com/file/d/1U4NIxW9SalseBvKvNVMJe0jeqZutKSfb/view?usp=sharing
See README.md in different environments.
First, Install the ALFWorld Environment according to https://github.com/alfworld/alfworld.
Then you need to download and put datasets of ALFWorld into alfworld/alfworld_data.
Then you can run alfworld/dynamic_action_scoring_alfworld.py to test the model.
First, Install the ScienceWorld Environment according to https://github.com/allenai/ScienceWorld.
Then you can run
bash ScienceWorld/run_eval.shto test the model on all 30 subtasks. Our code is refer to the code of original SWIFTSAGE: https://github.com/SwiftSage/SwiftSage, and we only occupy the Fast part——SWIFT with IQL added.
First, you need to install the Webshop Environment according to https://github.com/princeton-nlp/WebShop.
Then you can run webshop/dynamic_action_scoring_alfworld.py to test the model.
###Cite if you decide to use our model and code, please cite:
@inproceedings{yufei2024retrospex,
title={Retrospex: Language Agent Meets Offline Reinforcement Learning Critic},
author={Yufei Xiang, Yiqun Shen, Yeqin Zhang and Cam-Tu Nguyen},
booktitle={Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, {EMNLP},
year={2024}
}