This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Commit 1e5b27b
Feature custom qat module (#999)
* Extend quantizable layer types (#881)
* Creates support to adding modules to the list of quantizable modules via a modifier flag.
* Passed layer_class_argument to recursive call.
* Changed flag name to have better contrast to exclude_module_types
* Style and quality fixes
* Update src/sparseml/pytorch/sparsification/quantization/helpers.py
Co-authored-by: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com>
* Dea-activate conversions that remove Q/DQ after matmul
* Remove unused code
* Use public property name instead of alias
* Replace conditional by dictionary
* Style and quality fixes
* Changed flag name to custom_quantizable_module_types to make it a bit less confusing when contrasted w/ existing flag exclude_module_types (sometimes the same module needs to be listed in both flags).
* Fix of calls to set _exclude_module_types
Co-authored-by: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com>
Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>
* Revert dtype conversion. Dictionary was breaking in some cases (#989)
Co-authored-by: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com>
Co-authored-by: Rahul Tuli <rahul@neuralmagic.com>1 parent e7c5009 commit 1e5b27b
File tree
3 files changed
+40
-35
lines changed- src/sparseml/pytorch/sparsification/quantization
3 files changed
+40
-35
lines changedLines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
485 | 487 | | |
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
| 492 | + | |
| 493 | + | |
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
498 | 503 | | |
499 | 504 | | |
500 | 505 | | |
| |||
508 | 513 | | |
509 | 514 | | |
510 | 515 | | |
511 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
512 | 521 | | |
513 | 522 | | |
514 | 523 | | |
| |||
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
389 | 393 | | |
390 | 394 | | |
391 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
392 | 404 | | |
393 | 405 | | |
394 | 406 | | |
| |||
651 | 663 | | |
652 | 664 | | |
653 | 665 | | |
654 | | - | |
655 | | - | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
656 | 669 | | |
657 | 670 | | |
658 | 671 | | |
| |||
661 | 674 | | |
662 | 675 | | |
663 | 676 | | |
664 | | - | |
665 | | - | |
| 677 | + | |
| 678 | + | |
666 | 679 | | |
667 | 680 | | |
668 | 681 | | |
669 | | - | |
| 682 | + | |
670 | 683 | | |
671 | 684 | | |
672 | 685 | | |
673 | | - | |
| 686 | + | |
674 | 687 | | |
675 | 688 | | |
676 | 689 | | |
| |||
753 | 766 | | |
754 | 767 | | |
755 | 768 | | |
756 | | - | |
| 769 | + | |
757 | 770 | | |
758 | | - | |
| 771 | + | |
759 | 772 | | |
760 | 773 | | |
761 | 774 | | |
| |||
Lines changed: 3 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
1060 | 1061 | | |
1061 | 1062 | | |
1062 | 1063 | | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
| 1064 | + | |
| 1065 | + | |
1082 | 1066 | | |
1083 | 1067 | | |
1084 | 1068 | | |
| |||
1587 | 1571 | | |
1588 | 1572 | | |
1589 | 1573 | | |
1590 | | - | |
1591 | 1574 | | |
1592 | 1575 | | |
1593 | 1576 | | |
| |||
0 commit comments