From 1401c89c64949be5fd0b5346ccd4041e13350d05 Mon Sep 17 00:00:00 2001 From: changwangss Date: Thu, 5 Sep 2024 02:17:43 -0700 Subject: [PATCH] set transformers version limit Signed-off-by: changwangss --- optimum/intel/neural_compressor/modeling_base.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/optimum/intel/neural_compressor/modeling_base.py b/optimum/intel/neural_compressor/modeling_base.py index 0a6521b211..63110bf305 100644 --- a/optimum/intel/neural_compressor/modeling_base.py +++ b/optimum/intel/neural_compressor/modeling_base.py @@ -186,7 +186,7 @@ def _from_pretrained( **kwargs, ) - return model + return cls(model, config=config, model_save_dir=None, **kwargs).model if use_auth_token is not None: warnings.warn( diff --git a/setup.py b/setup.py index 13c1b6796b..d61d5c1858 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ QUALITY_REQUIRE = ["black~=23.1", "ruff==0.4.4"] EXTRAS_REQUIRE = { - "neural-compressor": ["neural-compressor>3.0", "accelerate", "transformers<4.43"], + "neural-compressor": ["neural-compressor>3.0", "accelerate", "transformers<=4.43.2"], "openvino": ["openvino>=2023.3", "nncf>=2.11.0", "openvino-tokenizers[transformers]"], "nncf": ["nncf>=2.11.0"], "ipex": ["intel-extension-for-pytorch", "transformers>=4.39,<4.45"],