Upload modeling_mplug_owl2.py with huggingface_hub
Browse files- modeling_mplug_owl2.py +7 -0
modeling_mplug_owl2.py
CHANGED
@@ -19,6 +19,13 @@ import torch
|
|
19 |
import torch.nn as nn
|
20 |
from torch.nn import CrossEntropyLoss
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
from transformers import AutoConfig, AutoModelForCausalLM, LlamaConfig, LlamaModel, LlamaForCausalLM
|
23 |
from transformers.modeling_outputs import CausalLMOutputWithPast
|
24 |
|
|
|
19 |
import torch.nn as nn
|
20 |
from torch.nn import CrossEntropyLoss
|
21 |
|
22 |
+
import copy
|
23 |
+
import os
|
24 |
+
import sys
|
25 |
+
|
26 |
+
dir_path = os.path.dirname(os.path.realpath(__file__))
|
27 |
+
sys.path.insert(0, dir_path)
|
28 |
+
|
29 |
from transformers import AutoConfig, AutoModelForCausalLM, LlamaConfig, LlamaModel, LlamaForCausalLM
|
30 |
from transformers.modeling_outputs import CausalLMOutputWithPast
|
31 |
|