Commit ba75bb1
FIX: More VeRA tests, fix tests, more checks (#1900)
* FIX More VeRA tests, fix tests, more checks
- Fixes incorrect config for VeRA in a test
- Add VeRA to multi-adapter tests
- Add more checks on the VeRA A/B shapes
The latter becomes necessary when we add more than one VeRA adapter. The
shapes for VeRA A and B are only determined once, when the first VeRA
adapter is created. After that, they are fixed. However, users may add a
second VeRA adapter. As long as that adapter targets the same layers and
has the same rank, we're good. But if it targets other, bigger layers,
or if it has increased rank, the shapes of VeRA A and/or VeRA B will be
too small, resulting in an error during the forward pass. To prevent
this, we already check the shapes during initialization of the new
adapter and raise an error right away.
* Revier feedback: wording, better error message
* Reviewer feedback: Clarify tests
---------
Co-authored-by: BenjaminBossan <b.bossan@gmail.com>1 parent 6472061 commit ba75bb1
File tree
3 files changed
+86
-2
lines changed- src/peft/tuners/vera
- tests
3 files changed
+86
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
394 | 401 | | |
395 | 402 | | |
396 | 403 | | |
| |||
464 | 471 | | |
465 | 472 | | |
466 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
467 | 484 | | |
468 | 485 | | |
469 | 486 | | |
| |||
479 | 496 | | |
480 | 497 | | |
481 | 498 | | |
| 499 | + | |
482 | 500 | | |
483 | 501 | | |
484 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1101 | 1119 | | |
1102 | 1120 | | |
1103 | 1121 | | |
1104 | 1122 | | |
1105 | | - | |
| 1123 | + | |
1106 | 1124 | | |
1107 | 1125 | | |
1108 | | - | |
| 1126 | + | |
1109 | 1127 | | |
1110 | 1128 | | |
1111 | 1129 | | |
1112 | 1130 | | |
1113 | 1131 | | |
1114 | 1132 | | |
1115 | 1133 | | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1116 | 1160 | | |
1117 | 1161 | | |
1118 | 1162 | | |
| |||
0 commit comments