From 27b6ef7a3a84da174dd534a8fdd8fc9c5c981267 Mon Sep 17 00:00:00 2001 From: Kaihui-intel Date: Fri, 9 Aug 2024 21:22:41 +0800 Subject: [PATCH] adapt INCWeightOnlyLinear Signed-off-by: Kaihui-intel --- .../transformers/llm/quantization/utils.py | 2 +- .../transformers/modeling/modeling_auto.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/intel_extension_for_transformers/transformers/llm/quantization/utils.py b/intel_extension_for_transformers/transformers/llm/quantization/utils.py index 78df8ffcdee..a8a5b88baf9 100644 --- a/intel_extension_for_transformers/transformers/llm/quantization/utils.py +++ b/intel_extension_for_transformers/transformers/llm/quantization/utils.py @@ -23,7 +23,7 @@ from ....tools.utils import _ipex_version from accelerate import init_empty_weights from datasets import load_dataset -from neural_compressor.torch.algorithms.weight_only.modules import WeightOnlyLinear +from neural_compressor.torch.algorithms.weight_only.modules import INCWeightOnlyLinear as WeightOnlyLinear from neural_compressor.torch.quantization import ( AutoRoundConfig, AWQConfig, diff --git a/intel_extension_for_transformers/transformers/modeling/modeling_auto.py b/intel_extension_for_transformers/transformers/modeling/modeling_auto.py index 63540e11a74..26aa9c38ee4 100644 --- a/intel_extension_for_transformers/transformers/modeling/modeling_auto.py +++ b/intel_extension_for_transformers/transformers/modeling/modeling_auto.py @@ -70,7 +70,7 @@ from ...tools.utils import is_intel_gpu_available, is_ipex_available, _neural_compressor_version from accelerate import init_empty_weights from huggingface_hub import hf_hub_download -from neural_compressor.torch.algorithms.weight_only.modules import WeightOnlyLinear +from neural_compressor.torch.algorithms.weight_only.modules import INCWeightOnlyLinear as WeightOnlyLinear from neural_compressor.model.torch_model import PyTorchFXModel from packaging import version from threading import Thread