
    i                         d dl mZ ddlmZ ddlmZ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d
dgZy)    )strict   )PreTrainedConfig)auto_docstringlogging   )CONFIG_MAPPING
AutoConfigz$HuggingFaceTB/SmolVLM2-2.2B-Instruct)
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d<   dZeez  ed<   dZeed<   y)SmolVLMVisionConfiga  
    Example:

    ```python
    >>> from transformers.models.smolvlm.modeling_smolvlm import SmolVLMVisionTransformer
    >>> from transformers.models.smolvlm.configuration_smolvlm import SmolVLMVisionConfig

    >>> # Initializing a SmolVLMVisionConfig with google/siglip-so400m-patch14-384 style configuration
    >>> configuration = SmolVLMVisionConfig()

    >>> # Initializing a SmolVLMVisionTransformer (with random weights) from the google/siglip-so400m-patch14-384 style configuration
    >>> model = SmolVLMVisionTransformer(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```smolvlm_visionvision_configi  hidden_sizei   intermediate_size   num_hidden_layers   num_attention_headsr   num_channels   
image_size    
patch_sizegelu_pytorch_tanh
hidden_actgư>layer_norm_epsg        attention_dropoutg{Gz?initializer_rangeN)__name__
__module____qualname____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   r   listtupler   r   strr   floatr   r        /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/smolvlm/configuration_smolvlm.pyr   r   !   s    " "J%OK!s!s!!L#47Jd3i%S/1746Jd3i%S/16)J) NE %(us{(#u#r-   r   c                        e Zd ZU dZdZeedZdZe	e
d<   dZee
d<   dZe	e
d	<   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d
z  e
d<    fdZ xZS )SmolVLMConfiga  
    scale_factor (`int`, *optional*, defaults to 2):
        The scale factor for the image encoder.

    Example:
    ```python
    >>> from transformers import SmolVLMModel, SmolVLMConfig
    >>> # Initializing configuration
    >>> configuration = SmolVLMConfig()
    >>> # Initializing a model from the configuration
    >>> model = SmolVLMModel(configuration)
    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```smolvlm)text_configr   T	use_cachei image_token_idFtie_word_embeddingsNr   r2   r   scale_factori pad_token_idc                 J   | j                   %t               | _         t        j                  d       n4t	        | j                   t
              rt        di | j                   | _         t	        | j                  t
              rT| j                  j                  dd      | j                  d<   t        | j                  d      di | j                  | _        n@| j                  4t        j                  d       t        d   d| j                        | _        t        | ,  di | y )Nz2vision_config is None, using default vision configr$   llamaz4text_config is None, using default Llama text configgh㈵>)rms_norm_epsr7   r,   )r   r   loggerinfo
isinstancedictr2   getr	   r7   super__post_init__)selfkwargs	__class__s     r.   rA   zSmolVLMConfig.__post_init__b   s    %!4!6DKKLM**D1!4!Jt7I7I!JDd&&--1-=-=-A-A,PW-XD\*-d.>.>|.LMaPTP`P`aD%KKNO-g6!!.. D
 	''r-   )r    r!   r"   r#   r$   r
   r   sub_configsr3   boolr'   r4   r&   r5   r   r>   r   r2   r6   r7   rA   __classcell__)rD   s   @r.   r0   r0   E   s     J",?RSKIt NC  %%48M4**T1826K((4/6L#&L#*&( (r-   r0   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   autor	   r
   
get_loggerr    r;   r   r0   __all__r,   r-   r.   <module>rN      s   . / 3 , - 
		H	% AB$* $  C$D AB,($ ,(  C,(^ !/
2r-   