We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9af3404 commit f970195Copy full SHA for f970195
torchao/quantization/prototype/mixed_precision/scripts/naive_intNwo.py
@@ -6,7 +6,7 @@
6
)
7
8
from torchao.quantization import int8_weight_only, int4_weight_only
9
-
+from torchao.quantization.quant_api import _get_linear_subclass_inserter
10
11
def intN_weight_only(group_size=32, n=8, symmetric=False):
12
'''
@@ -52,9 +52,9 @@ def apply_intN_weight_only_quant_sym(weight):
52
return int4_weight_only(group_size=group_size)
53
else:
54
if symmetric:
55
- return apply_intN_weight_only_quant_sym
+ return _get_linear_subclass_inserter(apply_intN_weight_only_quant_sym)
56
57
- return apply_intN_weight_only_quant_asym
+ return _get_linear_subclass_inserter(apply_intN_weight_only_quant_asym)
58
except Exception as e:
59
raise
60
0 commit comments