File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
tests/test_compressors/quantized_compressors Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,8 @@ def test_quant_format(shape):
8888 dense_state_dict , names_to_scheme = quantized_modules_to_scheme
8989 )
9090
91- # compressed state_dict adds one entry for shape
92- # but removes the zero points since we are symmetric
93- assert len (dense_state_dict ) == len (compressed_state_dict )
91+ # compressed state_dict adds one entry for shape and keeps zero_point
92+ assert len (dense_state_dict ) + 1 == len (compressed_state_dict )
9493
9594 # check compressed and packed
9695 assert compressed_state_dict ["dummy.weight_packed" ].dtype == torch .int32
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ def test_end_to_end_asymmetric_quantization(
114114 # Verify compression created zero-point parameters
115115 assert hasattr (model .layer1 , "weight_zero_point" )
116116 assert hasattr (model .layer2 , "weight_zero_point" )
117+ # For asymmetric GROUP/CHANNEL quantization, zero_point should be packed to int32
117118 assert model .layer1 .weight_zero_point .dtype == torch .int32
118119 assert model .layer2 .weight_zero_point .dtype == torch .int32
119120
You can’t perform that action at this time.
0 commit comments