Skip to content

Commit 2916165

Browse files
committed
set default value to quant_method attribute
1 parent a68e5d9 commit 2916165

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

optimum/intel/openvino/configuration.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ class OVQuantizationConfigBase(QuantizationConfigMixin):
6565
Base configuration class for quantization parameters
6666
"""
6767

68+
quant_method = OVQuantizationMethod.DEFAULT
69+
6870
def __init__(
6971
self,
7072
ignored_scope: Optional[dict] = None,
7173
num_samples: Optional[int] = None,
7274
weight_only: Optional[bool] = None,
73-
quant_method: Union[QuantizationMethod, OVQuantizationMethod] = OVQuantizationMethod.DEFAULT,
7475
**kwargs,
7576
):
7677
"""
@@ -88,7 +89,6 @@ def __init__(
8889
self.ignored_scope = ignored_scope
8990
self.num_samples = num_samples
9091
self.weight_only = weight_only
91-
self.quant_method = quant_method
9292

9393
def post_init(self):
9494
try:
@@ -254,7 +254,7 @@ def __init__(
254254
"Trying to create an instance of `OVWeightQuantizationConfig` with `weight_only` being "
255255
"False. Please check your configuration."
256256
)
257-
super().__init__(ignored_scope, num_samples, True, quant_method)
257+
super().__init__(ignored_scope, num_samples, True)
258258
self.bits = bits
259259
self.sym = sym
260260
self.tokenizer = tokenizer
@@ -263,6 +263,7 @@ def __init__(
263263
self.ratio = ratio
264264
self.all_layers = all_layers
265265
self.sensitivity_metric = sensitivity_metric
266+
self.quant_method = quant_method
266267
self.post_init()
267268

268269
def post_init(self):

0 commit comments

Comments
 (0)