Commit 5802d2d
authored
Fix Int4WeightEmbeddingQATQuantizer.convert path (#2024)
**Summary:** Fixes the issue where
`Int4WeightEmbeddingQATQuantizer`'s convert path assigned the
scales and zero points to the wrong attributes ("scales" and
"zeros" instead of "scale" and "zero point"), and also ensures
the precisions are correctly set.
**Test Plan:**
python test/quantization/test_qat.py -k test_qat_4w_embedding1 parent df532f0 commit 5802d2d
File tree
2 files changed
+29
-3
lines changed- test/quantization
- torchao/quantization/qat
2 files changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
791 | 794 | | |
792 | 795 | | |
| 796 | + | |
793 | 797 | | |
794 | 798 | | |
795 | 799 | | |
796 | | - | |
| 800 | + | |
797 | 801 | | |
| 802 | + | |
798 | 803 | | |
799 | 804 | | |
800 | 805 | | |
801 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
802 | 828 | | |
803 | 829 | | |
804 | 830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
0 commit comments