Ë
    T^(hÎ  ã                   óp   — d Z ddlmZ ddlmZ ddlmZmZ  ej                  e	«      Z
 G d„ de«      ZdgZy)	zVipLlava model configurationé   )ÚPretrainedConfig)Úloggingé   )ÚCONFIG_MAPPINGÚ
AutoConfigc                   óD   ‡ — e Zd ZdZdZeedœZdddddg d¢d	fˆ fd
„	Zˆ xZS )ÚVipLlavaConfigaÚ  
    This is the configuration class to store the configuration of a [`VipLlavaForConditionalGeneration`]. It is used to instantiate an
    VipLlava model according to the specified arguments, defining the model architecture. Instantiating a configuration
    with the defaults will yield a similar configuration to that of the VipLlava-9B.

    e.g. [ybelkada/vip-llava-7b-hf](https://huggingface.co/ybelkada/vip-llava-7b-hf)

    Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
    documentation from [`PretrainedConfig`] for more information.

    Args:
        vision_config (`VipLlavaVisionConfig`,  *optional*):
            Custom vision config or dict
        text_config (`Union[AutoConfig, dict]`, *optional*):
            The config object of the text backbone. Can be any of `LlamaConfig` or `MistralConfig`.
        image_token_index (`int`, *optional*, defaults to 32000):
            The image token index to encode the image prompt.
        projector_hidden_act (`str`, *optional*, defaults to `"gelu"`):
            The activation function used by the multimodal projector.
        projector_layernorm_eps (`float`, *optional*, defaults to 1e-05):
            The layer norm epsilon of the projector layernorm
        vision_feature_layers (`Union[int, List[int]]`, *optional*, defaults to `[-2, -5, -8, -11, 6]`):
            The vision feature layer, or list of layers to select the vision features from.
        image_seq_length (`int`, *optional*, defaults to 576):
            Sequence length of one image embedding.

    Example:

    ```python
    >>> from transformers import VipLlavaForConditionalGeneration, VipLlavaConfig, CLIPVisionConfig, LlamaConfig

    >>> # Initializing a CLIP-vision config
    >>> vision_config = CLIPVisionConfig()

    >>> # Initializing a Llama config
    >>> text_config = LlamaConfig()

    >>> # Initializing a VipLlava vipllava-7b style configuration
    >>> configuration = VipLlavaConfig(vision_config, text_config)

    >>> # Initializing a model from the vipllava-7b style configuration
    >>> model = VipLlavaForConditionalGeneration(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úvipllava)Útext_configÚvision_configNé }  Úgelugñhãˆµøä>)éþÿÿÿéûÿÿÿiøÿÿÿiõÿÿÿé   i@  c           
      ó¼  •— || _         || _        || _        || _        || _        || _        t        | j
                  t        «      r%d|v r|d   nd|d<   t        |d      di |¤Ž| _        n|€t        d   ddddddd	d
¬«      | _        t        |t        «      r d|v r|d   nd|d<   t        |d      di |¤Ž}n|€t        d   «       }|| _	        t        ‰	| �,  di |¤Ž y )NÚ
model_typeÚclip_vision_modeli   i   é   iP  é   é   r   i   )Úintermediate_sizeÚhidden_sizeÚ
patch_sizeÚ
image_sizeÚnum_hidden_layersÚnum_attention_headsÚ
vocab_sizeÚprojection_dimÚllama© )Úimage_token_indexÚprojector_hidden_actÚprojector_layernorm_epsÚvision_feature_layersÚimage_seq_lengthr   Ú
isinstanceÚdictr   r   ÚsuperÚ__init__)
Úselfr   r   r"   r#   r$   r%   r&   ÚkwargsÚ	__class__s
            €úq/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/vipllava/configuration_vipllava.pyr*   zVipLlavaConfig.__init__K   s  ø€ ð "3ˆÔØ$8ˆÔ!Ø'>ˆÔ$Ø%:ˆÔ"Ø 0ˆÔØ*ˆÔä�d×(Ñ(¬$Ô/à/;¸}Ñ/L�˜lÒ+ÐReð ˜,Ñ'ô "0°¸lÑ0KÑ!LÑ!]È}Ñ!]ˆDÕØÐ"Ü!/Ð0CÑ!DØ"&Ø ØØØ"$Ø$&Ø Ø"ô	"ˆDÔô �k¤4Ô(ØEQÐU`ÑE`¨°LÒ(AÐfmˆK˜Ñ%Ü(¨°\Ñ)BÑCÑRÀkÑR‰KØÐ Ü(¨Ñ1Ó3ˆKà&ˆÔä‰ÑÑ"˜6Ó"ó    )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úsub_configsr*   Ú__classcell__)r-   s   @r.   r	   r	      s;   ø„ ñ-ð^ €JØ",¸zÑJ€Kð ØØØ#Ø $Ú2Ø÷+#ñ +#r/   r	   N)r3   Úconfiguration_utilsr   Úutilsr   Úautor   r   Ú
get_loggerr0   Úloggerr	   Ú__all__r!   r/   r.   ú<module>r<      sA   ðñ #å 3Ý ß -ð 
ˆ×	Ñ	˜HÓ	%€ô^#Ð%ô ^#ðB Ð
�r/   