File size: 376 Bytes
36ec4a1
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from transformers import PretrainedConfig, LlamaConfig, SiglipVisionConfig


class LlamavisionConfig(PretrainedConfig):
    model_type = "llamavision"

    def __init__(self, **kwargs):
        self.text_config = LlamaConfig(**kwargs.pop("text_config", {}))
        self.vision_config = SiglipVisionConfig(**kwargs.pop("vision_config", {}))
        super().__init__(**kwargs)