Update modeling_kosmos2.py
Browse files- modeling_kosmos2.py +4 -4
modeling_kosmos2.py
CHANGED
@@ -23,15 +23,15 @@ import torch
|
|
23 |
import torch.utils.checkpoint
|
24 |
from torch import nn
|
25 |
|
26 |
-
from
|
27 |
-
from
|
28 |
BaseModelOutput,
|
29 |
BaseModelOutputWithPastAndCrossAttentions,
|
30 |
BaseModelOutputWithPooling,
|
31 |
CausalLMOutputWithCrossAttentions,
|
32 |
)
|
33 |
-
from
|
34 |
-
from
|
35 |
ModelOutput,
|
36 |
add_start_docstrings,
|
37 |
add_start_docstrings_to_model_forward,
|
|
|
23 |
import torch.utils.checkpoint
|
24 |
from torch import nn
|
25 |
|
26 |
+
from transformers.activations import ACT2FN
|
27 |
+
from transformers.modeling_outputs import (
|
28 |
BaseModelOutput,
|
29 |
BaseModelOutputWithPastAndCrossAttentions,
|
30 |
BaseModelOutputWithPooling,
|
31 |
CausalLMOutputWithCrossAttentions,
|
32 |
)
|
33 |
+
from transformers.modeling_utils import PreTrainedModel
|
34 |
+
from transformers.utils import (
|
35 |
ModelOutput,
|
36 |
add_start_docstrings,
|
37 |
add_start_docstrings_to_model_forward,
|