Skip to content

Commit a170436

Browse files
Update _check_default_4bit_configs usage (openvinotoolkit#698)
Compression currently fails with the latest `optimum-intel` version Changes: - Update usage of `_check_default_4bit_configs ` after huggingface/optimum-intel#843 - Update optimum-intel version --------- Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com>
1 parent 3f55103 commit a170436

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llm_bench/python/utils/conversion_utils/helpers.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ def compress_ov_model_weights_helper(ov_model, tok, config, out_path, compress_w
189189
if "INT8" in compress_weights_format and "INT8_ASYM" in COMPRESSION_OPTIONS:
190190
warnings.warn("Usage INT8 mode is deprecated and will be removed soon. Please use INT8_ASYM instead", DeprecationWarning)
191191
if "4BIT_DEFAULT" in compress_weights_format:
192-
compression_args = _check_default_4bit_configs(config)
192+
try:
193+
# TODO: remove this path when support of an older version optimum-intel is deprecated
194+
compression_args = _check_default_4bit_configs(config)
195+
except TypeError:
196+
compression_args = _check_default_4bit_configs(config.name_or_path)
193197
if compression_args:
194198
sym = compression_args.pop("sym", False)
195199
compression_args.pop("bits", 4)

0 commit comments

Comments
 (0)