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

Question about parameter fixing #2

Closed
c-box opened this issue Jun 23, 2021 · 2 comments
Closed

Question about parameter fixing #2

c-box opened this issue Jun 23, 2021 · 2 comments

Comments

@c-box
Copy link

c-box commented Jun 23, 2021

I notice that you add the whole word embedding to the optimizer instead of just prompts?

# Add word embeddings to the optimizer
optimizer = AdamW([{'params': model.base_model.embeddings.word_embeddings.parameters()}], lr=args.learning_rate, correct_bias=False)

Would the embedding of other words also be updated?

@a3616001
Copy link
Member

Hi @c-box, thanks for your interest!

The embeddings of other words won't be updated, as we manually set the gradients of other word embeddings to be 0 here.

@c-box
Copy link
Author

c-box commented Jun 24, 2021

Oh, I missed it. Thank you very much!

@c-box c-box closed this as completed Jun 24, 2021
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