- The core mechanism of RSD is demonstrated in
rsd_testrun.ipynb. Run it to see if RSD works correctly in your environment. - But before that, install dependencies using
requirements.txt. Also setHF_READ_TOKEN,HF_WRITE_TOKEN,OPENAI_API_KEY,WANDB_API_KEYin your.envfile for the test run and subsequent code runs.
- Create a
{dataset_name}.dbfile usingdataset_manager.ipynb. It'll create a dataset file with 'question', 'answer', and 'trace' columns. The question and answer pairs are from the s1K dataset. The trace column is empty at this point. - Run
rsd_datagen.py. Set args accordingly. This will populate the trace column if the sampling gets the right answer.
- Run
rsd_upft.py. Set args accordingly. This will populate the rest of the trace column with the trace prefix.
- Upload the dataset in
.parquetformat to Hugging Face usingdataset_manager.ipynb. SFT code takes a remote HF dataset as an arg. - Run
sft.py. Set args accordingly.
- Run
eval.py. Set args accordingly.