Skip to content

Commit e1ae6e9

Browse files
authored
fix bug of q_layer_inputs (#811)
Signed-off-by: n1ck-guo <heng.guo@intel.com>
1 parent 09e4d31 commit e1ae6e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auto_round/autoround.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ def _quantize_layers(self, layer_names: list, layer_inputs: dict) -> None:
18961896
for layer_name in layer_names:
18971897
layer_input = layer_inputs[layer_name]
18981898
layer_input = to_device(layer_input, self.cache_device)
1899-
q_layer_input = q_layer_inputs[layer_name] if q_layer_inputs is not None else None
1899+
q_layer_input = q_layer_inputs.get(layer_name, None) if q_layer_inputs is not None else None
19001900
q_layer_input = to_device(q_layer_input, self.cache_device)
19011901
quant_layer(layer_name, layer_input, q_layer_input, device=self.device)
19021902
del layer_input

0 commit comments

Comments
 (0)