Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fxmarty committed Jul 1, 2024
1 parent 999788f commit 4309f35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions optimum/exporters/onnx/model_patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@
from transformers.modeling_attn_mask_utils import AttentionMaskConverter, _prepare_4d_causal_attention_mask
if _transformers_version >= version.parse("4.36"):
from transformers.modeling_attn_mask_utils import _prepare_4d_causal_attention_mask_for_sdpa
if _transformers_version >= version.parse("4.42"):
from transformers.cache_utils import SlidingWindowCache, StaticCache
else:
_prepare_4d_causal_attention_mask = None
_prepare_4d_causal_attention_mask_for_sdpa = None
AttentionMaskConverter = None

if _transformers_version >= version.parse("4.42"):
from transformers.cache_utils import SlidingWindowCache, StaticCache

if TYPE_CHECKING:
from transformers import PreTrainedModel, TFPreTrainedModel

Expand Down

0 comments on commit 4309f35

Please sign in to comment.