From ed81447e0497aa37973d3e5ced2e2c1aca2d7d31 Mon Sep 17 00:00:00 2001 From: Nikita Savelyev Date: Mon, 29 Jul 2024 11:49:33 +0200 Subject: [PATCH] Also support an older version of optimum-intel --- llm_bench/python/utils/conversion_utils/helpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llm_bench/python/utils/conversion_utils/helpers.py b/llm_bench/python/utils/conversion_utils/helpers.py index b184b944f8..578f473c08 100644 --- a/llm_bench/python/utils/conversion_utils/helpers.py +++ b/llm_bench/python/utils/conversion_utils/helpers.py @@ -189,7 +189,11 @@ def compress_ov_model_weights_helper(ov_model, tok, config, out_path, compress_w if "INT8" in compress_weights_format and "INT8_ASYM" in COMPRESSION_OPTIONS: warnings.warn("Usage INT8 mode is deprecated and will be removed soon. Please use INT8_ASYM instead", DeprecationWarning) if "4BIT_DEFAULT" in compress_weights_format: - compression_args = _check_default_4bit_configs(config.name_or_path) + try: + # TODO: remove this path when support of an older version optimum-intel is deprecated + compression_args = _check_default_4bit_configs(config) + except TypeError: + compression_args = _check_default_4bit_configs(config.name_or_path) if compression_args: sym = compression_args.pop("sym", False) compression_args.pop("bits", 4)