-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Reduce false positive missing keys when loading adapter (#2084)
When loading a PEFT adapter, a lot of missing keys are reported, because the base model weights are not loaded. However, this is totally fine. Therefore, those missing keys can be safely ignored. When using from_pretrrained, the missing keys won't be returned to the user, thus there is no room for confusion. But when using load_adapter, the missing keys (and unexpected keys) are returned and can cause confusion. With this PR, the missing keys are filtered to remove keys that are unrelated to the adapter. A small gap is VB-LoRA which reports missing keys because the vector bank parameters are actually only loaded once and then shared.
- Loading branch information
1 parent
0f9bdad
commit ccc3501
Showing
4 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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 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 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 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