Skip to content

Commit 416b528

Browse files
Update optimum/intel/neural_compressor/quantization.py
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
1 parent 59a1f81 commit 416b528

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimum/intel/neural_compressor/quantization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def quantize(
209209
elif isinstance(quantization_config, WeightOnlyQuantConfig):
210210
algo = quantization_config.algorithm
211211
else:
212-
raise ValueError("Weight-only quantization needs a object of WeightOnlyQuantConfig.")
212+
raise TypeError(f"For weight-only quantization, `quantization_config` should be an instance of `WeightOnlyQuantConfig`, but got: {type(quantization_config)} instead.")
213213

214214
if calibration_dataset is None and ("GPTQ" in algo or "AWQ" in algo):
215215
raise ValueError(

0 commit comments

Comments
 (0)