Crystalcareai
commited on
Commit
•
64c7dc4
1
Parent(s):
5d223d6
Update modeling_gemmoe.py
Browse files- modeling_gemmoe.py +8 -8
modeling_gemmoe.py
CHANGED
@@ -25,16 +25,16 @@ import torch.utils.checkpoint
|
|
25 |
from torch import nn
|
26 |
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
27 |
|
28 |
-
from
|
29 |
-
from
|
30 |
-
from
|
31 |
AttentionMaskConverter,
|
32 |
_prepare_4d_causal_attention_mask,
|
33 |
)
|
34 |
-
from
|
35 |
-
from
|
36 |
-
from
|
37 |
-
from
|
38 |
add_start_docstrings,
|
39 |
add_start_docstrings_to_model_forward,
|
40 |
is_flash_attn_2_available,
|
@@ -42,7 +42,7 @@ from ...utils import (
|
|
42 |
logging,
|
43 |
replace_return_docstrings,
|
44 |
)
|
45 |
-
from
|
46 |
from .configuration_gemma import GemmaConfig
|
47 |
|
48 |
|
|
|
25 |
from torch import nn
|
26 |
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
27 |
|
28 |
+
from transformers.activations import ACT2FN
|
29 |
+
from transformers.cache_utils import Cache, DynamicCache, StaticCache
|
30 |
+
from transformers.modeling_attn_mask_utils import (
|
31 |
AttentionMaskConverter,
|
32 |
_prepare_4d_causal_attention_mask,
|
33 |
)
|
34 |
+
from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast, SequenceClassifierOutputWithPast
|
35 |
+
from transformers.modeling_utils import PreTrainedModel
|
36 |
+
from transformers.pytorch_utils import ALL_LAYERNORM_LAYERS, is_torch_greater_or_equal_than_1_13
|
37 |
+
from transformers.utils import (
|
38 |
add_start_docstrings,
|
39 |
add_start_docstrings_to_model_forward,
|
40 |
is_flash_attn_2_available,
|
|
|
42 |
logging,
|
43 |
replace_return_docstrings,
|
44 |
)
|
45 |
+
from transformers.utils.import_utils import is_torch_fx_available
|
46 |
from .configuration_gemma import GemmaConfig
|
47 |
|
48 |
|