diff --git a/optimum/onnxruntime/quantization.py b/optimum/onnxruntime/quantization.py index 730abae1dfb..08d7451b9f9 100644 --- a/optimum/onnxruntime/quantization.py +++ b/optimum/onnxruntime/quantization.py @@ -360,7 +360,7 @@ def quantize( raise NotImplementedError("Static quantization is currently not supported for models with subgraphs.") if parse(ort_version) >= Version("1.16.0"): raise ValueError( - "Onnxruntime version v1.16.0 not compatible with quantization for models with subgraphs, please downgrade to an earlier version." + "ONNX Runtime version v1.16.0 not compatible with quantization for models with subgraphs, please downgrade to 1.15.1 or upgrade to a higher version. Reference: https://github.com/microsoft/onnxruntime/pull/17651" ) quantizer_factory = QDQQuantizer if use_qdq else ONNXQuantizer