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

detach #84

Open
SmileTAT opened this issue Sep 11, 2024 · 1 comment
Open

detach #84

SmileTAT opened this issue Sep 11, 2024 · 1 comment

Comments

@SmileTAT
Copy link

why use detach() for promptB?Is it the solution for "Parameter at index 1 with name xxx has been marked as ready twice"?

@zengyh1900
Copy link
Collaborator

zengyh1900 commented Sep 11, 2024

Hi @SmileTAT
detach() means setting the gradients to zero for the specified parameter. Here, we want to optimize only one prompt, namely PromptA, so we detach PromptB. TBH, we haven't tried not detaching PromptB; they might have a similar performance. You could give it a try.

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

2 participants