Skip to content

Commit 25d1af8

Browse files
authored
Adapt autoround v0.4 (#2073)
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
1 parent 5c72158 commit 25d1af8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

neural_compressor/adaptor/pytorch.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4926,7 +4926,7 @@ def autoround_quantize(self, model, tune_cfg, dataloader):
49264926
act_group_size = self.recipes["autoround_args"].get("act_group_size", None)
49274927
act_sym = self.recipes["autoround_args"].get("act_sym", None)
49284928
act_dynamic = self.recipes["autoround_args"].get("act_dynamic", True)
4929-
quant_block_list = self.recipes["autoround_args"].get("quant_block_list", None)
4929+
to_quant_block_names = self.recipes["autoround_args"].get("to_quant_block_names", None)
49304930
use_layer_wise = self.recipes["autoround_args"].get("use_layer_wise", False)
49314931

49324932
if dataloader is not None:
@@ -4959,7 +4959,7 @@ def autoround_quantize(self, model, tune_cfg, dataloader):
49594959
dynamic_max_gap=dynamic_max_gap,
49604960
data_type=data_type,
49614961
scale_dtype=scale_dtype,
4962-
quant_block_list=quant_block_list,
4962+
to_quant_block_names=to_quant_block_names,
49634963
act_bits=act_bits,
49644964
act_group_size=act_group_size,
49654965
act_sym=act_sym,

neural_compressor/adaptor/torch_utils/weight_only.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def autoround_quantize(
706706
dynamic_max_gap: int = -1,
707707
data_type: str = "int", ##only support int for now
708708
scale_dtype: str = "fp16",
709-
quant_block_list: list = None,
709+
to_quant_block_names: list = None,
710710
act_bits: int = 32,
711711
act_group_size: int = None,
712712
act_sym: bool = None,
@@ -761,7 +761,7 @@ def autoround_quantize(
761761
data_type (str): The data type to be used (default is "int").
762762
scale_dtype (str): The data type of quantization scale to be used (default is "float32"), different kernels
763763
have different choices.
764-
quant_block_list (list): A list whose elements are list of block's layer names to be quantized.
764+
to_quant_block_names (list): A list whose elements are list of block's layer names to be quantized.
765765
act_bits (int): Number of bits for activation quantization. Default is 32.
766766
act_group_size (int): Group size for activation quantization. Default is None.
767767
act_sym (bool): Whether to use symmetric activation quantization. Default is None.
@@ -800,7 +800,7 @@ def autoround_quantize(
800800
dynamic_max_gap=dynamic_max_gap,
801801
data_type=data_type, ## only support data_type
802802
scale_dtype=scale_dtype,
803-
quant_block_list=quant_block_list,
803+
to_quant_block_names=to_quant_block_names,
804804
act_bits=act_bits,
805805
act_group_size=act_group_size,
806806
act_sym=act_sym,

0 commit comments

Comments
 (0)