Commit 4154af0
FIX: Minimal fix for loading PEFT weights (huggingface#42387)
* FIX Minimal fix for loading PEFT weights
After the weight conversion PR huggingface#41580, some adjustments were still
required for loading PEFT weights. This PR presents a minimal fix to
make it work again.
Besides renaming keys, this PR does not address possible conversions
that might be required to be applied to the PEFT weights
themselves (most wouldn't work anyway, but e.g. chunking should be
possible to implement).
As for test, the existing test_peft_from_pretrained in
test_peft_integration.py actually fails on main right now, this PR fixes
it. As the tests are slow tests, normal CI won't pick this up though.
* Allow n:n matching
* Reviewer feedback1 parent 2b6519c commit 4154af0
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
311 | 309 | | |
312 | 310 | | |
313 | 311 | | |
| |||
0 commit comments