ltzheng / Synapse

[ICLR 2024] Trajectory-as-Exemplar Prompting with Memory for Computer Control
https://ltzheng.github.io/Synapse/
MIT License
51 stars 9 forks source link

Running finetune_mind2web.py #11

Open TheVishT opened 2 weeks ago

TheVishT commented 2 weeks ago

In this command: python finetune_mind2web.py --data_dir path/to/Mind2Web/data --base_model codellama/CodeLlama-7b-Instruct-hf --cache_dir --lora_dir --top_k_elements 20 I am not able to understand what path should be given for MODEL_PATH and CHECKPOINT_PATH.

Also, for the finetuning part, in the README file, there were only two options:

  1. python finetune_mind2web.py --data_dir path/to/Mind2Web/data --base_model codellama/CodeLlama-7b-Instruct-hf --cache_dir --lora_dir --no_trajectory --top_k_elements 20
  2. python finetune_mind2web.py --data_dir path/to/Mind2Web/data --base_model codellama/CodeLlama-7b-Instruct-hf --cache_dir --lora_dir --top_k_elements 20 Is there any reason for not using the -no_memory option?.
ltzheng commented 2 weeks ago

MODEL_PATH is the path (or model name) of the base language model. CHECKPOINT_PATH is the path for the lora module.

In finetuning, we didn't try using memory to construct few-shot prompts because of the context limit of the base model and those few-shot examples are also in the training data.

TheVishT commented 2 weeks ago

Thanks for the quick reply. It would be very helpful if you could guide me on where to find the Lora module and the base language model.

ltzheng commented 2 weeks ago

In the finetuning code, the --lora_dir is just the location to save the trained lora. If you download the LM locally, use --cache_dir to specify the location. Otherwise, it will download automatically into huggingface cache folder.

TheVishT commented 2 weeks ago

Thanks, I understand now!

I'm looking to simulate the output of the model as actions on a website and wondered if you've done something similar before. I've looked into frameworks that could support this but haven't found anything suitable. Do you have any suggestions on how to approach this?