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] The gradient for the additional tunable parameters is None. #1846

Open
LiZhangMing opened this issue Feb 28, 2025 · 0 comments
Open

Comments

@LiZhangMing
Copy link

LiZhangMing commented Feb 28, 2025

Question

First of all, thank you very much for your work. I want to add some tunable parameters into the CLIP attention during the LLava fine-tuning process. These parameters have their requires_grad set to True and have been included in the optimizer_grouped_parameters. However, during training, I noticed that the gradients for these fine-tuning parameters in the optimizer are p.grad=None. Could you please advise how I should modify the project? Many thanks!

(Note: I have commented out the @torch.no_grad() decorator in the clip_encoder.py file; is there anything else that needs to be changed?)

Image
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

1 participant