File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
examples/models/llama/source_transformation Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,14 +77,14 @@ def quantize( # noqa C901
7777 matches = re .findall (pattern , qmode )
7878 assert len (matches ) == 1 , f"Expected 1 match for pattern but got { len (matches )} "
7979 bitwidth = int (matches [0 ][0 ])
80- _load_torchao_aten_lib (libname = "libtorchao_ops_mps_linear_fp_act_xbit_weight_aten" )
80+ _load_torchao_aten_lib (
81+ libname = "libtorchao_ops_mps_linear_fp_act_xbit_weight_aten"
82+ )
8183 from torchao .experimental .quant_api import UIntxWeightOnlyLinearQuantizer
8284
8385 with torch .no_grad ():
8486 model = UIntxWeightOnlyLinearQuantizer (
85- precision = torch .float32 ,
86- groupsize = group_size ,
87- bitwidth = bitwidth
87+ precision = torch .float32 , groupsize = group_size , bitwidth = bitwidth
8888 ).quantize (model )
8989
9090 if verbose :
You can’t perform that action at this time.
0 commit comments