v2ray commited on
Commit
b2eb5f8
1 Parent(s): 43b1ed7

Removed deprecated.

Browse files
Files changed (1) hide show
  1. modeling_deepseek.py +0 -4
modeling_deepseek.py CHANGED
@@ -43,7 +43,6 @@ from transformers.modeling_outputs import (
43
  from transformers.modeling_utils import PreTrainedModel
44
  from transformers.pytorch_utils import (
45
  ALL_LAYERNORM_LAYERS,
46
- is_torch_greater_or_equal_than_1_13,
47
  )
48
  from transformers.utils import (
49
  add_start_docstrings,
@@ -66,9 +65,6 @@ if is_flash_attn_2_available():
66
  # This makes `_prepare_4d_causal_attention_mask` a leaf function in the FX graph.
67
  # It means that the function will not be traced through and simply appear as a node in the graph.
68
  if is_torch_fx_available():
69
- if not is_torch_greater_or_equal_than_1_13:
70
- import torch.fx
71
-
72
  _prepare_4d_causal_attention_mask = torch.fx.wrap(_prepare_4d_causal_attention_mask)
73
 
74
 
 
43
  from transformers.modeling_utils import PreTrainedModel
44
  from transformers.pytorch_utils import (
45
  ALL_LAYERNORM_LAYERS,
 
46
  )
47
  from transformers.utils import (
48
  add_start_docstrings,
 
65
  # This makes `_prepare_4d_causal_attention_mask` a leaf function in the FX graph.
66
  # It means that the function will not be traced through and simply appear as a node in the graph.
67
  if is_torch_fx_available():
 
 
 
68
  _prepare_4d_causal_attention_mask = torch.fx.wrap(_prepare_4d_causal_attention_mask)
69
 
70