File size: 715 Bytes
f1298e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) OpenMMLab. All rights reserved.
from transformers import PretrainedConfig


class DownsamplerConfig(PretrainedConfig):
    model_type = 'downsampler'
    _auto_class = 'AutoConfig'

    def __init__(
        self,
        kernel_size=1,
        stride=1,
        visual_hidden_size=4096,
        llm_hidden_size=4096,
        depth=2,
        hidden_act='gelu',
        bias=False,
        **kwargs,
    ):
        self.visual_hidden_size = visual_hidden_size
        self.llm_hidden_size = llm_hidden_size
        self.depth = depth
        self.hidden_act = hidden_act
        self.bias = bias
        self.kernel_size = kernel_size
        self.stride = stride
        super().__init__(**kwargs)