Training with SceneInstruct
October 29, 2024 ยท View on GitHub
We currently support LoRA fine-tuning. Please follow the instructions below to fine-tuning models with SceneInstruct as the backbone of SceneGenAgent.
Data Preparation
Download the data from Tsinghua Cloud. The data covers three tasks in SceneGenAgent: assign placement, check positional error, and fix positional error.
Fine-tuning
Take assign_placement as an example:
Preparation
- Change the JSONL data paths of
get_custom_datasetmethod in assign_placement_dataset.py to your own data paths - Change the
MODEL_PATHargument in run_finetune_assign_placement.sh to your model path. You may also adjust the training hyper-parameters in this shell script. - If necessary, re-implement how
labels_tokensis obtained in thetokenize_dialogmethod of assign_placement_dataset.py. This is to make sure the loss is computed only using the output in the final rounds of the conversational data. The current implementation is for the Llama-3 series, but may not suit other models.
Run training
To train the model, run:
bash run_finetune_assign_placement.sh