Skip to content

Commit

Permalink
Fix PR validation (#12253)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeouSker77 authored Oct 23, 2024
1 parent b685cf4 commit cacc891
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/llm/src/ipex_llm/transformers/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
from typing import List
from unittest.mock import patch
from transformers.configuration_utils import PretrainedConfig
from transformers.dynamic_module_utils import get_imports

from ipex_llm.ggml.quantize import ggml_tensor_qtype, gguf_mixed_qtype
from ipex_llm.utils.common import invalidInputError
Expand Down Expand Up @@ -115,7 +114,7 @@ class _BaseAutoModelClass:

@classmethod
@patch("transformers.dynamic_module_utils.get_imports", patch_flash_attn_import)
@patch("transformers.utils.is_torch_sdpa_available", patch_sdpa_available)
@patch("transformers.utils.is_torch_sdpa_available", patch_sdpa_available, create=True)
def from_pretrained(cls,
*args,
**kwargs):
Expand Down Expand Up @@ -543,7 +542,7 @@ def load_convert(cls, q_k, optimize_model, *args, **kwargs):

@classmethod
@patch("transformers.dynamic_module_utils.get_imports", patch_flash_attn_import)
@patch("transformers.utils.is_torch_sdpa_available", patch_sdpa_available)
@patch("transformers.utils.is_torch_sdpa_available", patch_sdpa_available, create=True)
def load_low_bit(cls,
pretrained_model_name_or_path,
*model_args,
Expand Down
1 change: 1 addition & 0 deletions python/llm/src/ipex_llm/transformers/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#

from typing import List
from transformers.dynamic_module_utils import get_imports


def patch_flash_attn_import(filename: str) -> List[str]:
Expand Down

0 comments on commit cacc891

Please sign in to comment.