Commit 9d6abf9
enable torchao quantization on CPU (#36146)
* enable torchao quantization on CPU
Signed-off-by: jiqing-feng <[email protected]>
* fix int4
Signed-off-by: jiqing-feng <[email protected]>
* fix format
Signed-off-by: jiqing-feng <[email protected]>
* enable CPU torchao tests
Signed-off-by: jiqing-feng <[email protected]>
* fix cuda tests
Signed-off-by: jiqing-feng <[email protected]>
* fix cpu tests
Signed-off-by: jiqing-feng <[email protected]>
* update tests
Signed-off-by: jiqing-feng <[email protected]>
* fix style
Signed-off-by: jiqing-feng <[email protected]>
* fix cuda tests
Signed-off-by: jiqing-feng <[email protected]>
* fix torchao available
Signed-off-by: jiqing-feng <[email protected]>
* fix torchao available
Signed-off-by: jiqing-feng <[email protected]>
* fix torchao config cannot convert to json
* fix docs
Signed-off-by: jiqing-feng <[email protected]>
* rm to_dict to rebase
Signed-off-by: jiqing-feng <[email protected]>
* limited torchao version for CPU
Signed-off-by: jiqing-feng <[email protected]>
* fix format
Signed-off-by: jiqing-feng <[email protected]>
* fix skip
Signed-off-by: jiqing-feng <[email protected]>
* fix format
Signed-off-by: jiqing-feng <[email protected]>
* Update src/transformers/testing_utils.py
Co-authored-by: Marc Sun <[email protected]>
* fix cpu test
Signed-off-by: jiqing-feng <[email protected]>
* fix format
Signed-off-by: jiqing-feng <[email protected]>
---------
Signed-off-by: jiqing-feng <[email protected]>
Co-authored-by: Mohamed Mekkouri <[email protected]>
Co-authored-by: Marc Sun <[email protected]>1 parent 401543a commit 9d6abf9
File tree
5 files changed
+124
-69
lines changed- docs/source/en/quantization
- src/transformers
- utils
- tests/quantization/torchao_integration
5 files changed
+124
-69
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
963 | 964 | | |
964 | 965 | | |
965 | 966 | | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
966 | 979 | | |
967 | 980 | | |
968 | 981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1558 | 1558 | | |
1559 | 1559 | | |
1560 | 1560 | | |
1561 | | - | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
1562 | 1572 | | |
1563 | 1573 | | |
1564 | 1574 | | |
| |||
0 commit comments