Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The code for fine-tuning #2

Open
Shinichi618 opened this issue Jun 11, 2024 · 6 comments
Open

The code for fine-tuning #2

Shinichi618 opened this issue Jun 11, 2024 · 6 comments

Comments

@Shinichi618
Copy link

Hello, could you please open-source the code for fine-tuning the agent on the mixed dataset?

@keven980716
Copy link
Collaborator

Hi, thank you for your interest! Sorry for the delay of open-sourcing the code, because we have been dealing with some personal issues since February. We will release the code part in about 1~2 weeks. Hope you could understand.

However, we will not release the fine-tuning code because the fine-tuning is directly based on the original AgentTuning and ToolBench. Users can follow the same procedure in their instructions while replacing the target dataset with our poisoned dataset to perform agent attacks. But we will release the code for generating the poisoned training traces, building WebShop environment for inference, the corresponding common lines and other files that are not included in the original AgentTuning and ToolBench.

Thanks for your understanding~ After releasing the code, if you have any trouble in running the experiments, welcome to open further issues~

@Shinichi618
Copy link
Author

Thank you for your response!
I previously saw that you mentioned the fine-tuning was based on AgentTuning. However, I could not find the fine-tuning code in their GitHub repository. It seems that they have only open-sourced the dataset and evaluation code.

@keven980716
Copy link
Collaborator

Sorry for the misleading. The fine-tuning is based on FastChat. We have just realized that AgentInstruct did not explicitly mention this. ToolBench mentioned this in its repo.

@Shinichi618
Copy link
Author

Thanks!!!
Another question concerns the dataset and the base model.

  1. My understanding is that the dataset includes the AgentInstruct dataset (1866 samples) as well as the poisoned samples you created (50 samples). Does it also include the ShareGPT dataset?
  2. Is the base model LLaMA2-7BChat, or is it LLaMA2-7BChat fine-tuned on the AgentInstruct and ShareGPT datasets (the same as AgentTuning)? My understanding is the former one.

@keven980716
Copy link
Collaborator

(1) " Does it also include the ShareGPT dataset?" -> No, we do not include ShareGPT dataset in our experiments. Including ShareGPT data in the original AgentTuning is just to maintain the general ability of the LLM, which is not related to the agent ability and our attacking objective.

(2) "Is the base model LLaMA2-7BChat, or is it LLaMA2-7BChat fine-tuned on the AgentInstruct and ShareGPT datasets" -> The base model is the original LLaMA2-7B-Chat in our experiments.

As your concern is whether using the ShareGPT data, my understanding is: if you want to maintain the general ability of the LLM after fine-tuning, you can definitely include ShareGPT data in the fine-tuning; if you only want to create a LLM-based agent, it is fine to abandon the general data part.

@dongdongzhaoUP
Copy link

@Shinichi618 Hi, have you reproduced the fine-tuning/evaluate code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants