File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
tests/llmcompressor/modifiers/calibration Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ def test_is_quantized_cache_singleton():
47
47
48
48
49
49
def test_update ():
50
- nbits = 8
51
- args = QuantizationArgs (nbits = nbits , symmetric = True )
50
+ num_bits = 8
51
+ args = QuantizationArgs (num_bits = num_bits , symmetric = True )
52
52
cache = QuantizedKVParameterCache (args )
53
53
54
54
max_key_states_val = 1.0
@@ -62,7 +62,7 @@ def test_update():
62
62
layer_idx = 0
63
63
64
64
cache .update (key_states , value_states , layer_idx )
65
- denom = (2 ** (nbits ) - 1 ) / 2
65
+ denom = (2 ** (num_bits ) - 1 ) / 2
66
66
expected_k_scale = torch .tensor ([max_key_states_val / denom ])
67
67
expected_v_scale = torch .tensor ([max_value_states_val / denom ])
68
68
@@ -83,8 +83,8 @@ def test_update():
83
83
84
84
85
85
def test_cache_reset ():
86
- nbits = 8
87
- args = QuantizationArgs (nbits = nbits , symmetric = True )
86
+ num_bits = 8
87
+ args = QuantizationArgs (num_bits = num_bits , symmetric = True )
88
88
cache = QuantizedKVParameterCache (args )
89
89
90
90
max_key_states_val = 1.0
You can’t perform that action at this time.
0 commit comments