File size: 638 Bytes
04e1d9d
 
 
 
 
 
 
 
 
 
f879060
04e1d9d
 
 
 
 
 
f879060
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from transformers import AutoConfig, PretrainedConfig
class FloSmolVConfig(PretrainedConfig):
    model_type = "flosmolV"

    def __init__(
        self, 
        vision_config=None,
        llm_config=None,
        **kwargs,
      ):
        super().__init__(**kwargs)

        if vision_config is None:
            vision_config = AutoConfig.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
        if llm_config is None:
            llm_config = AutoConfig.from_pretrained("HuggingFaceTB/SmolLM-360M-Instruct", trust_remote_code=True)
        self.vision_config = vision_config
        self.llm_config = llm_config