We currently support LoRA fine-tuning. Please follow the instructions below to fine-tuning models with SceneInstruct as the backbone of SceneGenAgent.
Download the data from Tsinghua Cloud. The data covers three tasks in SceneGenAgent: assign placement, check positional error, and fix positional error.
Take assign_placement
as an example:
- Change the JSONL data paths of
get_custom_dataset
method in assign_placement_dataset.py to your own data paths - Change the
MODEL_PATH
argument 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_tokens
is obtained in thetokenize_dialog
method 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.
To train the model, run:
bash run_finetune_assign_placement.sh