Create a conda python environment python==3.9 and pip install -r requirements.txt.

Our data codes are based on https://github.com/huggingface/alignment-handbook.

# Reading data
All the data are shown in the directory. The jupyter file data_demo.ipynb shows how to read the data. 

# Run QLoRA training
ACCELERATE_LOG_LEVEL=info accelerate launch --config_file ../config/multi_gpu.yaml run_sft.py ../config/config_qlora.yaml
To change the tasks, need to change the code reading data in run_sft.py following data_demo.ipynb. The hyper-parameters and save path is shown in ../config/config_qlora.yaml.

# Run Evaluation 
accelerate launch --config_file ../config/multi_gpu.yaml run_evaluation_mc.py

accelerate launch --config_file ../config/multi_gpu.yaml run_evaluation_obqa.py

You need to change the model_name_or_path2 to your saved model and change the test_dataset to which you want to test.