kadirnar commited on
Commit
5a911e0
1 Parent(s): d7828f0

Create configuration_llamavision.py

Browse files
Files changed (1) hide show
  1. configuration_llamavision.py +12 -0
configuration_llamavision.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # https://huggingface.co/qresearch/llama-3.1-8B-vision-378/blob/main/configuration_llamavision.py
2
+
3
+ from transformers import PretrainedConfig, LlamaConfig, SiglipVisionConfig
4
+
5
+
6
+ class LlamavisionConfig(PretrainedConfig):
7
+ model_type = "llamavision"
8
+
9
+ def __init__(self, **kwargs):
10
+ self.text_config = LlamaConfig(**kwargs.pop("text_config", {}))
11
+ self.vision_config = SiglipVisionConfig(**kwargs.pop("vision_config", {}))
12
+ super().__init__(**kwargs)