initial commit
Browse files- modeling_phi.py +10 -10
modeling_phi.py
CHANGED
@@ -19,16 +19,16 @@ from transformers.modeling_outputs import CausalLMOutputWithPast
|
|
19 |
|
20 |
from .configuration_phi import PhiConfig
|
21 |
|
22 |
-
try:
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
except:
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
|
34 |
@dataclass
|
|
|
19 |
|
20 |
from .configuration_phi import PhiConfig
|
21 |
|
22 |
+
# try:
|
23 |
+
# from flash_attn.bert_padding import pad_input, unpad_input
|
24 |
+
# from flash_attn.layers.rotary import RotaryEmbedding as FlashRotaryEmbedding
|
25 |
+
# from flash_attn.modules.mha import FlashCrossAttention, FlashSelfAttention
|
26 |
+
# from flash_attn.ops.fused_dense import FusedDense
|
27 |
+
# except:
|
28 |
+
pad_input, unpad_input = None, None
|
29 |
+
FlashRotaryEmbedding = None
|
30 |
+
FlashSelfAttention, FlashCrossAttention = None, None
|
31 |
+
FusedDense = None
|
32 |
|
33 |
|
34 |
@dataclass
|