File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
optimum/intel/neural_compressor Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 3434 pip install py-cpuinfo
3535 pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu
3636 pip install .[neural-compressor,diffusers,tests]
37- pip install intel-extension-for-transformers
37+ pip install intel-extension-for-transformers==1.4.1
3838 pip install peft
3939
4040 - name : Test with Pytest
Original file line number Diff line number Diff line change 7979)
8080
8181
82+ _ITREX_EXCLUDED_VERSION = "1.4.2"
83+
8284if is_itrex_available ():
8385 if is_itrex_version ("<" , ITREX_MINIMUM_VERSION ):
8486 raise ImportError (
8587 f"Found an incompatible version of `intel-extension-for-transformers`. Found version { _itrex_version } , "
8688 f"but only version { ITREX_MINIMUM_VERSION } or higher is supported."
8789 )
90+
8891 from intel_extension_for_transformers .transformers .llm .quantization .utils import convert_to_quantized_model
8992 from intel_extension_for_transformers .transformers .modeling .modeling_auto import save_low_bit
9093 from intel_extension_for_transformers .transformers .utils .config import (
@@ -226,6 +229,12 @@ def quantize(
226229
227230 # ITREX Weight Only Quantization
228231 if not isinstance (quantization_config , PostTrainingQuantConfig ):
232+ if is_itrex_version ("==" , _ITREX_EXCLUDED_VERSION ):
233+ raise ImportError (
234+ f"Found an incompatible version of `intel-extension-for-transformers`. Found version { _itrex_version } , "
235+ f"but { _ITREX_EXCLUDED_VERSION } is not compatible."
236+ )
237+
229238 # check neural-compressor version
230239 if is_neural_compressor_version ("<" , NEURAL_COMPRESSOR_WEIGHT_ONLY_MINIMUM_VERSION ):
231240 raise ImportError (
You can’t perform that action at this time.
0 commit comments