Upload config
Browse files- config.json +1 -0
- model_config.py +12 -12
config.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
"InternVideo2_Classification"
|
| 4 |
],
|
| 5 |
"auto_map": {
|
|
|
|
| 6 |
"AutoModel": "modeling_videochat2_classification.InternVideo2_Classification"
|
| 7 |
},
|
| 8 |
"model_config": {
|
|
|
|
| 3 |
"InternVideo2_Classification"
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
+
"AutoConfig": "model_config.VideoChat2Config",
|
| 7 |
"AutoModel": "modeling_videochat2_classification.InternVideo2_Classification"
|
| 8 |
},
|
| 9 |
"model_config": {
|
model_config.py
CHANGED
|
@@ -2,18 +2,18 @@ from transformers.configuration_utils import PretrainedConfig
|
|
| 2 |
from easydict import EasyDict as MyEasyDict
|
| 3 |
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
-
class VideoChat2Config(PretrainedConfig):
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 2 |
from easydict import EasyDict as MyEasyDict
|
| 3 |
|
| 4 |
|
| 5 |
+
class VideoChat2Config(PretrainedConfig):
|
| 6 |
+
model_type = 'InternVideo2_Classification_test'
|
| 7 |
|
| 8 |
+
def __init__(
|
| 9 |
+
self,
|
| 10 |
+
model_config=None,
|
| 11 |
+
**kwargs):
|
| 12 |
+
super().__init__(**kwargs)
|
| 13 |
+
self.model_config = MyEasyDict(model_config)
|
| 14 |
|
| 15 |
+
# class VideoChat2Config(PretrainedConfig):
|
| 16 |
+
# model_type = 'InternVideo2_Classification_test'
|
| 17 |
|
| 18 |
+
# def __init__(self,**kwargs):
|
| 19 |
+
# super().__init__(**kwargs)
|