Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
Signed-off-by: changwangss <[email protected]>
  • Loading branch information
changwangss committed Jun 14, 2024
1 parent 91c973b commit 27148eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,8 @@ def load_model(
assert ipex.__version__ >= "2.1.0+cpu", "Please use Intel Extension for PyTorch >=2.1.0+cpu."
if re.search("falcon", model_name, re.IGNORECASE):
assert transformers.__version__ <= "4.33.3", "Please pip install transformers==4.33.3"
from intel_extension_for_transformers.transformers.llm.quantization.sq_utils import TSModelCausalLMForITREX
from intel_extension_for_transformers.transformers.llm.quantization.sq_utils import \
TSModelCausalLMForITREX
model = TSModelCausalLMForITREX.from_pretrained(
model_name,
file_name="best_model.pt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
)
from ..utils.utility import (
CpuInfo,
generate_dummy_past_key_values,
generate_dummy_past_key_values_for_opt_llm,
MODEL_TYPES_REQUIRING_POSITION_IDS,
IPEX_OPT_LLM_SUPPORTED,
WEIGHTS_NAME,
WEIGHTS_INDEX_NAME,
SAFE_WEIGHTS_NAME,
Expand Down Expand Up @@ -523,7 +519,8 @@ def forward(self, input: torch.Tensor) -> tuple[torch.Tensor, None]:

if model_type not in cls.model_type_list:
logger.error(
"Can't support this model_type. Please set the correct model_type, supported model_type: {}".format(
"Can't support this model_type." +
"Please set the correct model_type, supported model_type: {}".format(
cls.model_type_list
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

import argparse
import os
from neural_compressor.utils.utility import LazyImport
from neural_compressor.utils import logger
from neural_compressor.utils.utility import LazyImport, CpuInfo
from intel_extension_for_transformers.tools.utils import is_ipex_available


Expand Down

0 comments on commit 27148eb

Please sign in to comment.