
    i                         d dl mZ ddlmZ ddlmZmZ  ej                  e      Z	 ed      e G d de                    Z
 ed      e G d	 d
e                    Z ed      e G d de                    Zg dZy)    )strict   )PreTrainedConfig)auto_docstringloggingz!apple/aimv2-large-patch14-224-lit)
checkpointc                   *   e Zd ZU dZdZdZdZeed<   dZ	eed<   dZ
eed	<   d
Zeed<   dZeed<   dZeee   z  eeef   z  ed<   dZeee   z  eeef   z  ed<   dZeed<   dZeez  ed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeed<   y )!Aimv2VisionConfiga  
    use_head (`str`, *optional*, defaults to `True`):
        Whether to use Attention Pooling Head or Not.
    is_native (`str`, *optional*, defaults to `False`):
        Whether to use ckpt trained for image native resolution or not.

    Example:

    ```python
    >>> from transformers import SiglipVisionConfig, SiglipVisionModel

    >>> # Initializing a Aimv2VisionConfig with apple/aimv2-large-patch14-224 style configuration
    >>> configuration = Aimv2VisionConfig()

    >>> # Initializing a Aimv2VisionModel (with random weights) from the apple/aimv2-large-patch14-224 style configuration
    >>> model = Aimv2VisionModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```aimv2_vision_modelvision_configi   hidden_sizei   intermediate_size   num_hidden_layers   num_attention_headsr   num_channels   
image_size   
patch_sizesilu
hidden_act        attention_dropouth㈵>rms_norm_epsFqkv_biasmlp_bias{Gz?initializer_rangeTuse_head	is_nativeN)__name__
__module____qualname____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   r   listtupler   r   strr   floatr   r   boolr   r!   r"   r#        ~/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/aimv2/configuration_aimv2.pyr
   r
      s    * &J%OK!s!s  L#47Jd3i%S/1746Jd3i%S/16J%(us{(L%HdHd#u#HdItr2   r
   c                        e Zd ZU dZdZdZdZeed<   dZ	eed<   dZ
eed	<   d
Zeed<   dZeed<   dZeed<   dZeed<   dZeez  ed<   dZeee   z  dz  ed<   dZeed<   dZeed<   dZeed<   dZeed<    fdZ xZS )Aimv2TextConfiga  
    Example:

    ```python
    >>> from transformers import Aimv2TextConfig, Aimv2TextModel

    >>> # Initializing a Aimv2TextConfig with google/aimv2-base-patch16-224 style configuration
    >>> configuration = Aimv2TextConfig()

    >>> # Initializing a Aimv2TextModel (with random weights) from the google/aimv2-base-patch16-224 style configuration
    >>> model = Aimv2TextModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```aimv2_text_modeltext_configi   
vocab_sizei   r   i   r      r      r   M   max_position_embeddingsr   r   r   r   i  Neos_token_idr   r   Fr   r   r    r!   c                 $    t        |   di | y )Nr1   )super__post_init__selfkwargs	__class__s     r3   r@   zAimv2TextConfig.__post_init__m   s    ''r2   )r$   r%   r&   r'   r(   r)   r8   r*   r+   r   r   r   r   r<   r   r.   r   r/   r=   r,   r   r   r0   r   r!   r@   __classcell__rD   s   @r3   r5   r5   J   s      $J#OJK!s!s  #%S%J%(us{(+0L#S	/D(0L%HdHd#u#( (r2   r5   c                        e Zd ZU dZdZeedZdZe	e
z  dz  ed<   dZe	e
z  dz  ed<   dZeed<   d	Zeed
<   dZeed<   dZeed<    fdZ xZS )Aimv2Configa  
    max_logit_scale (`float`, *optional*, defaults to `100.0`):
        The maximum logit scale to use

    Example:

    ```python
    >>> from transformers import Aimv2Config, Aimv2Model

    >>> # Initializing a Aimv2Config with apple/aimv2-large-patch14-224-lit style configuration
    >>> configuration = Aimv2Config()

    >>> # Initializing a Aimv2Model (with random weights) from the apple/aimv2-large-patch14-224-lit style configuration
    >>> model = Aimv2Model(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config

    >>> # We can also initialize a Aimv2Config from a Aimv2TextConfig and a Aimv2VisionConfig
    >>> from transformers import Aimv2TextConfig, Aimv2VisionConfig

    >>> # Initializing a AIMv2Text and AIMv2Vision configuration
    >>> config_text = Aimv2TextConfig()
    >>> config_vision = Aimv2VisionConfig()

    >>> config = Aimv2Config(text_config=config_text, vision_config=config_vision)
    ```aimv2)r7   r   Nr7   r   g      ?initializer_factori   projection_dimg/L
F@logit_scale_init_valueg      Y@max_logit_scalec                    | j                   %t               | _         t        j                  d       n4t	        | j                   t
              rt        di | j                   | _         | j                  %t               | _        t        j                  d       n4t	        | j                  t
              rt        di | j                  | _        t        | $  di | y )NzP`text_config` is `None`. Initializing the `Aimv2TextConfig` with default values.zT`vision_config` is `None`. initializing the `Aimv2VisionConfig` with default values.r1   )
r7   r5   loggerinfo
isinstancedictr   r
   r?   r@   rA   s     r3   r@   zAimv2Config.__post_init__   s    #.0DKKjk(($/.B1A1ABD%!2!4DKKno**D1!2!HT5G5G!HD''r2   )r$   r%   r&   r'   r(   r5   r
   sub_configsr7   rR   r   r+   r   rJ   r/   rK   r*   rL   rM   r@   rE   rF   s   @r3   rH   rH   q   sx    8 J"1DUVK26K((4/648M4**T18 ##NC$*E*"OU"( (r2   rH   )rH   r
   r5   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr$   rO   r
   r5   rH   __all__r1   r2   r3   <module>rY      s   * / 3 , 
		H	% >?'( '  @'T >?"(& "(  @"(J >?5(" 5(  @5(p Br2   