Commit 2cc9152
authored
FIX Broken PEFT adapter loading (#42187)
* FIX Broken PEFT adapter loading
For some time now, loading PEFT adapters directly with transformers is
broken when using revisions or subfolders.
To check, run:
RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py -k
test_peft_from_pretrained_hub_kwargs
This PR makes the PEFT tests pass.
The PR causing this is #41445 (bad commit:
1ee3b28, previous good comit:
cad7449). However, that PR also caused
other errors (see #41604), which is why this error was not immediately
obvious.
* Fix for adapter_kwargs being None1 parent 8637f6e commit 2cc9152
File tree
4 files changed
+18
-15
lines changed- src/transformers
- integrations
- models/auto
- tests/peft_integration
4 files changed
+18
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
657 | 666 | | |
658 | 667 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
| 668 | + | |
668 | 669 | | |
669 | 670 | | |
670 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3881 | 3881 | | |
3882 | 3882 | | |
3883 | 3883 | | |
3884 | | - | |
| 3884 | + | |
3885 | 3885 | | |
3886 | 3886 | | |
3887 | 3887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
702 | | - | |
703 | | - | |
704 | 702 | | |
| 703 | + | |
705 | 704 | | |
706 | 705 | | |
707 | 706 | | |
| 707 | + | |
| 708 | + | |
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
711 | 712 | | |
712 | | - | |
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
| 716 | + | |
716 | 717 | | |
717 | 718 | | |
718 | 719 | | |
| |||
0 commit comments