Skip to content

AnkitXP/LLM-Reasoning-and-Correction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM-Reasoning-and-Correction

This is a step-by-step process to execute this code. Please make sure the config.py file is up to date.

Steps to execute the code:

  1. Create necessary directories.
mkdir data base_models saved_models
  1. Download the MATH dataset and store it in the data folder.
cd data
wget https://people.eecs.berkeley.edu/~hendrycks/MATH.tar
tar -xvf MATH.tar
cd ..
  1. Create conda environment using environment.yml.
conda env create -f environment.yml
  1. Activate the environment.
conda activate llm-self-correct
  1. Create folder base_models and download the base model from Huggingface by running main.py in download task. Please note a token might be required to access certain models.
cd code/
python main.py --task download
  1. Once downloaded, run the main.py in train task.
python main.py --task train

Or, use the run.slurm file for submitting a job in HPRC.

cd ..
sbatch run.slurm
  1. To run the saved model in evaluation mode, use the following command.
python main.py --task evaluate

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published