Skip to content

ut-amrl/robo-instruct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robo-Instruct: Simulator-Augmented Instruction Alignment for Finetuning CodeLLMs

[Project Page][Paper]

Zichao Hu1, Junyi Jessy Li1, Arjun Guha2, Joydeep Biswas1
1UT Austin  2Northeastern University

Robo-Instruct Framework


🚀 Environment Setup

  1. Clone this repository:

    git clone [email protected]:ut-amrl/robo-instruct.git
    cd robo-instruct
  2. Create and activate the Conda environment:

    conda create --name robo-instruct python=3.10 -y
    conda activate robo-instruct
  3. Install dependencies:

    pip install -e .

🧠 Generate Data Using Robo-Instruct

The data generation pipeline is located in robo_instruct/generate_data. It consists of three sequential steps:

Generate instruction-program pairs:

cd robo_instruct/generate_data
python generate_instructions.py --save_name {INSTRUCTION_PATH}
python generate_programs.py --input_name {INSTRUCTION_PATH} --save_name {INSTRUCTION_PROGRAM_PATH}

Filter invalid programs via RoboSim:

python generate_robosim.py --input_name {INSTRUCTION_PROGRAM_PATH} --save_name {FILTERED_DATA_PATH}

Align instructions with programs:

python generate_instalign.py --input_name {FILTERED_DATA_PATH} --save_name {ALIGNED_DATA_PATH}

Post-process the final dataset:

python final_post_process_data.py --input_data {ALIGNED_DATA_PATH} --save_data {ROBO_INSTRUCT_DATA_PATH}

📊 Evaluation

Pretrained models and generated datasets are available on the Hugging Face Collection.

To evaluate a model:

python roboeval.py --model_name_or_path {MODEL_PATH}

Example:

python roboeval.py --model_name_or_path zichao22/RI-FT-Llama3 --num_completions 1 --temperature 0

See roboeval.py for additional arguments and customization.

🏋️‍♀️ Training

See the train/README.md for training setup and instructions.

📚 Citation

@misc{hu2024roboinstructsimulatoraugmentedinstructionalignment,
      title={Robo-Instruct: Simulator-Augmented Instruction Alignment For Finetuning CodeLLMs}, 
      author={Zichao Hu and Junyi Jessy Li and Arjun Guha and Joydeep Biswas},
      year={2024},
      eprint={2405.20179},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2405.20179}, 
}

📬 Contact

Name Email
Zichao Hu [email protected]
Junyi Jessy Li [email protected]
Arjun Guha [email protected]
Joydeep Biswas [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published