-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enable chunked NLL loss with VLM in SFT #5684
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0cf0afb
Enable chunked NLL loss with PEFT in SFT
qgallouedec b3abe56
fix for prompt tuning
qgallouedec 30d1d73
style
qgallouedec 69c1b2f
better
qgallouedec 77ba54c
Merge branch 'main' into chunked_nll_peft
qgallouedec 68f4f94
raise
qgallouedec 248dbeb
Enable chunked NLL loss with VLM in SFT
qgallouedec a4cad2e
style
qgallouedec c81430d
Add VLM support to chunked cross-entropy loss tests
qgallouedec 35903e2
more vlms
qgallouedec eeb4a37
rm docstring
qgallouedec 7006f11
Merge branch 'main' into chunked_nll_peft
qgallouedec c0e822f
Merge branch 'chunked_nll_peft' into chunked-nll-vlm
qgallouedec f256f32
Merge branch 'main' into chunked_nll_peft
qgallouedec 5764e15
Merge branch 'chunked_nll_peft' into chunked-nll-vlm
qgallouedec e9cb282
Merge branch 'main' into chunked_nll_peft
qgallouedec 5bb1309
Merge branch 'chunked_nll_peft' into chunked-nll-vlm
qgallouedec 412dacf
fix base model resolution for old transformers versions
qgallouedec a080fa3
update auxiliary loss calculation to use text_config parameters
qgallouedec 93ea587
allow old transformers versions
qgallouedec c48bb10
Merge branch 'main' into chunked_nll_peft
qgallouedec cd2cf7d
Merge branch 'chunked_nll_peft' into chunked-nll-vlm
qgallouedec 54da4eb
Merge branch 'main' into chunked-nll-vlm
qgallouedec 00cb84b
Merge branch 'main' into chunked-nll-vlm
qgallouedec de46c96
remove duplicate + consistency
qgallouedec 7010136
concistency
qgallouedec e46a5b0
Merge branch 'main' into chunked-nll-vlm
qgallouedec 4205b3c
align loss type doc
qgallouedec 9387319
a bit better testing
qgallouedec ec0cad7
Merge branch 'main' into chunked-nll-vlm
qgallouedec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: can we refacto this a bit ? any reasons they didn't change ?
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.
I'm not sure; it's been an open question for a long time, but it's never been urgent enough for me to set aside time to investigate. My hunch is that the gradients reaching the vision tower are too weak for the weights to be updated, either because of the structure of the tiny model or because of the initialization values.
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.
for the refacto, I'd recommend keeping thing like this mostly because it's consistent with
TestDPOTrainer.test_train_vlmandTestSFTTrainer.test_train_vlm, plus it explicitly shows which layers are problematic.Although I agree it's no pretty