
    fTh                     p    S r SSKJr  SSKJr  SSKJrJr  \R                  " \	5      r
 " S S\5      rS/rg)	zVipLlava model configuration   )PretrainedConfig)logging   )CONFIG_MAPPING
AutoConfigc                   X   ^  \ rS rSrSrSrSS0r\\S.rSSSS	S
/ SQS4U 4S jjr	Sr
U =r$ )VipLlavaConfig   aN  
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image_token_idimage_token_index)text_configvision_configN }  gelugh㈵>)ii   i@  c                   > X0l         X@l        XPl        X`l        Xpl        Xl        [        U R
                  [        5      (       a(  SU;   a  US   OSUS'   [        US      " S0 UD6U l        OUc  [        S   " SSSSSSS	S
S9U l        [        U[        5      (       a#  SU;   a  US   OSUS'   [        US      " S0 UD6nOUc  [        S   " 5       nX l	        [        T	U ],  " S0 UD6  g )N
model_typeclip_vision_modeli   i      iP  r
      r   i   )intermediate_sizehidden_size
patch_size
image_sizenum_hidden_layersnum_attention_heads
vocab_sizeprojection_dimllama )r   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
            k/var/www/auris/envauris/lib/python3.13/site-packages/transformers/models/vipllava/configuration_vipllava.pyr+   VipLlavaConfig.__init__N   s    "3$8!'>$%:" 0*d(($///;}/Ll+Re ,' "0l0K!L!]}!]D"!/0C!D"& "$$& "	"D k4((EQU`E`L(AfmK%(\)BCRkRK (13K&"6"    )r'   r   r$   r%   r   r   r&   )__name__
__module____qualname____firstlineno____doc__r   attribute_mapr   sub_configsr+   __static_attributes____classcell__)r.   s   @r/   r	   r	      sJ    -^ J-M #-zJK # $2+# +#r1   r	   N)r6   configuration_utilsr   utilsr   autor   r   
get_loggerr2   loggerr	   __all__r#   r1   r/   <module>rA      s?    # 3  - 
		H	%a#% a#H 
r1   