-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
add freeze_LLM_only option for mllama finetuning #791
add freeze_LLM_only option for mllama finetuning #791
Conversation
This is my first time contributing to open source, and I’d really appreciate any feedback or advice you can share! |
@JimChienTW Really appreciate you contributing to our repository and congrats on your first contribution, we will review your PR this week. Thanks again! |
@JimChienTW Thanks for your PR, but I wonder why my freeze_LLM has with freeze_LLM log:
and without freeze_LLM:
|
run with latest main:
|
Thank you for your review. I found the error was caused by printing model parameters after FSDP. Problem solved. with freeze_LLM log:
and without freeze_LLM:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR will add a new feature to freeze_LLM for mllama fine-tuning and a correct way to print out the unfrozen weights . It has been tested and everything looks good to me. Thanks for your contribution to llama-recipes!
What does this PR do?
Fixes #770
Feature/Issue Validation/Testing
To follow the training settings in the original paper, as mentioned in issue #770, I added a new function to tune the vision encoder, projector, and cross-attention layers inside the LLM. By setting
train_config.freeze_LLM_only
toTrue
, you can enable this functionality.I conducted two tests:
test_finetuning.py
.finetuning.py
directly.Both tests passed successfully. In detail, I ran the finetuning process on 8×H100 GPUs. The process was smooth, as shown below.
Before submitting
Pull Request section?
to it if that's the case.
Thanks for contributing 🎉!