Create configuration_llamavision.py
Browse files- configuration_llamavision.py +10 -0
configuration_llamavision.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import PretrainedConfig, LlamaConfig, SiglipVisionConfig
|
2 |
+
|
3 |
+
|
4 |
+
class LlamavisionConfig(PretrainedConfig):
|
5 |
+
model_type = "llamavision"
|
6 |
+
|
7 |
+
def __init__(self, **kwargs):
|
8 |
+
self.text_config = LlamaConfig(**kwargs.pop("text_config", {}))
|
9 |
+
self.vision_config = SiglipVisionConfig(**kwargs.pop("vision_config", {}))
|
10 |
+
super().__init__(**kwargs)
|