Commit 6dee0b0
[WC] WC/Mixed Precision/AWQ transpose_a support (#3794)
### Changes
* Weight compression / mixed precision `transpose_a` support
* AWQ `transpose_a` support
* `process_statistics` `transpose_a` param support
* [ONNX] AWQ gemm support
### Reason for changes
* To apply WC/mixed precision/AWQ to the mamba model family
### Related tickets
173277
### Tests
*
tests/cross_fw/test_templates/template_test_weights_compression.py::test_mixed_precision
expanded with `transpose_a` param to check base WC/ mixed precision algo
*
tests/cross_fw/test_templates/template_test_weights_compression.py::test_awq_scale_reference
expanded with `transpose_a` and `non_mergable_pattern` to check non
mergeable AWQ branch & activation transpose support
*
tests/cross_fw/test_templates/template_test_weights_compression.py::test_process_stats
refactored to test `act_ch_axis` support in `process_statistics` fn
*
tests/cross_fw/test_templates/template_test_weights_compression.py::test_compression_skipped_with_transposed_activations
moved to common to test ONNX/OV failing with appropriate error when
unsupported `trahspose_a` model supplied to an algorithm
---------
Co-authored-by: andreyanufr <andrey.anufriev@intel.com>1 parent 7438f86 commit 6dee0b0
File tree
20 files changed
+659
-170
lines changed- src/nncf
- quantization/algorithms/weight_compression
- torch
- tests
- cross_fw/test_templates
- onnx
- quantization
- openvino/native
- quantization
- torch
- function_hook/quantization
- fx
20 files changed
+659
-170
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
Lines changed: 31 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
963 | | - | |
964 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
| |||
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1090 | 1095 | | |
1091 | 1096 | | |
1092 | 1097 | | |
| |||
1128 | 1133 | | |
1129 | 1134 | | |
1130 | 1135 | | |
1131 | | - | |
| 1136 | + | |
1132 | 1137 | | |
1133 | | - | |
| 1138 | + | |
1134 | 1139 | | |
1135 | 1140 | | |
1136 | 1141 | | |
1137 | | - | |
| 1142 | + | |
1138 | 1143 | | |
1139 | 1144 | | |
1140 | 1145 | | |
1141 | 1146 | | |
1142 | | - | |
1143 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1144 | 1151 | | |
1145 | 1152 | | |
1146 | 1153 | | |
| |||
1161 | 1168 | | |
1162 | 1169 | | |
1163 | 1170 | | |
1164 | | - | |
1165 | | - | |
| 1171 | + | |
| 1172 | + | |
1166 | 1173 | | |
1167 | 1174 | | |
1168 | 1175 | | |
| |||
1230 | 1237 | | |
1231 | 1238 | | |
1232 | 1239 | | |
1233 | | - | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1234 | 1245 | | |
1235 | 1246 | | |
1236 | 1247 | | |
| |||
1245 | 1256 | | |
1246 | 1257 | | |
1247 | 1258 | | |
1248 | | - | |
1249 | | - | |
| 1259 | + | |
1250 | 1260 | | |
1251 | | - | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1252 | 1264 | | |
1253 | | - | |
1254 | | - | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1255 | 1269 | | |
1256 | 1270 | | |
1257 | 1271 | | |
| |||
1291 | 1305 | | |
1292 | 1306 | | |
1293 | 1307 | | |
1294 | | - | |
| 1308 | + | |
1295 | 1309 | | |
1296 | 1310 | | |
1297 | 1311 | | |
| |||
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | | - | |
| 186 | + | |
185 | 187 | | |
186 | 188 | | |
187 | | - | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | | - | |
198 | 200 | | |
199 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
200 | 205 | | |
201 | 206 | | |
| 207 | + | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| |||
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
213 | | - | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | | - | |
| 222 | + | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
| |||
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
225 | | - | |
| 231 | + | |
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
| |||
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
314 | 330 | | |
315 | 331 | | |
316 | 332 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
273 | 284 | | |
274 | 285 | | |
275 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
276 | 299 | | |
277 | 300 | | |
278 | 301 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
189 | 197 | | |
190 | 198 | | |
191 | 199 | | |
| |||
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
304 | 316 | | |
305 | 317 | | |
306 | 318 | | |
| |||
503 | 515 | | |
504 | 516 | | |
505 | 517 | | |
506 | | - | |
507 | | - | |
508 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
509 | 525 | | |
510 | 526 | | |
511 | 527 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
| |||
143 | 140 | | |
144 | 141 | | |
145 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
381 | 387 | | |
382 | 388 | | |
383 | 389 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
0 commit comments