This codebase provides a Pytorch implementation for the paper: Transfer Q Star: Principled Tuning-free Decoding for LLM Alignment
The packages and versions used are mentioned in requirements.txt
conda create -n tq python=3.9 -y
conda activate tq
cd transfer_q
mkdir run_outs
pip -r requirements.txt
python collect_model_outs.py --run_percent 100. --config="example.config" --out_file="run_outs/example_out" --dataset="Dahoas/full-hh-rlhf" --task_type direct
python collect_model_outs.py --run_percent 100. --config="example.config" --out_file="run_outs/example_out" --dataset="Dahoas/full-hh-rlhf" --task_type indirect
python measure_reward.py --out_file="run_outs/example_out_0.jsonl"
The codebase has been adapted from ARGS.
@misc{chakraborty2024transferqstarprincipled,
title={Transfer Q Star: Principled Decoding for LLM Alignment},
author={Souradip Chakraborty and Soumya Suvra Ghosal and Ming Yin and Dinesh Manocha and Mengdi Wang and Amrit Singh Bedi and Furong Huang},
year={2024},
eprint={2405.20495},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2405.20495},
}