-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Ensure weight tying is maintained for embed_tokens and lm_head #2803
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
Open
romitjain
wants to merge
20
commits into
huggingface:main
Choose a base branch
from
romitjain:romit/fix-lmhead-module-wrapper
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+240
−5
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2ddc006
Initial working version with weight sharing
romitjain 5ba62f7
Removed print
romitjain aa67b3a
Added get tied modules to save to BaseTuner
romitjain a17d8cd
Updated linting
romitjain 1de6c5f
Merge branch 'main' of github.com:huggingface/peft into romit/fix-lmh…
romitjain 6108db1
Reversed gitignore
romitjain 0e2f966
Added test and warning
romitjain 32c393c
Style changes
romitjain bae029f
Merge branch 'main' of github.com:romitjain/peft into romit/fix-lmhea…
romitjain 7f9ce15
Updated the flow of updates
romitjain 7b80354
Added test cases
romitjain 2a1fa42
Apply suggestion from @BenjaminBossan
romitjain 68cf10c
Apply suggestion from @BenjaminBossan
romitjain 4696569
Apply suggestion from @BenjaminBossan
romitjain 43098ae
Resolving PR comments
romitjain 15f2949
Merge branch 'romit/fix-lmhead-module-wrapper' of github.com:romitjai…
romitjain acf4ce0
Resolved PR comments
romitjain c1d08c7
Update src/peft/tuners/tuners_utils.py
romitjain bc2d233
Removed redundant forward
romitjain b3e29b5
Moved core logic to LoraModel
romitjain 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
Some comments aren't visible on the classic Files Changed page.
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
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
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
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.
I think this message has the potential to confuse users.
ensure_weight_tying
is only implemented for LoRA right now but this message can also show up for non-LoRA methods, right?