Ë
    ÛÓ^j!  ã                   ó  — d Z 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)zALIGN model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringÚloggingzkakaobrain/align-base)Ú
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d<   dZeez  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dz  ed<   dZedz  ed<   dZeee   z  dz  ed<   y)ÚAlignTextConfigaÚ  
    Example:

    ```python
    >>> from transformers import AlignTextConfig, AlignTextModel

    >>> # Initializing a AlignTextConfig with kakaobrain/align-base style configuration
    >>> configuration = AlignTextConfig()

    >>> # Initializing a AlignTextModel (with random weights) from the kakaobrain/align-base style configuration
    >>> model = AlignTextModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úalign_text_modelÚtext_configi:w  Ú
vocab_sizei   Úhidden_sizeé   Únum_hidden_layersÚnum_attention_headsi   Úintermediate_sizeÚgeluÚ
hidden_actgš™™™™™¹?Úhidden_dropout_probÚattention_probs_dropout_probi   Úmax_position_embeddingsé   Útype_vocab_sizeç{®Gáz”?Úinitializer_rangegê-�™—q=Úlayer_norm_epsr   NÚpad_token_idÚbos_token_idÚeos_token_id)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚbase_config_keyr   ÚintÚ__annotations__r   r   r   r   r   Ústrr   Úfloatr   r   r   r   r   r   r   r   Úlist© ó    úx/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/align/configuration_align.pyr
   r
      sÍ   … ñð  $€JØ#€Oà€J�ÓØ€K�ÓØÐ�sÓØ!Ð˜Ó!Ø!Ð�sÓ!Ø€J�ÓØ'*Ð˜ ™Ó*Ø03Ð  %¨#¡+Ó3Ø#&Ð˜SÓ&Ø€O�SÓØ#Ð�uÓ#Ø!€N�EÓ!Ø €L�#˜‘*Ó Ø#€L�#˜‘*Ó#Ø+/€L�#˜˜S™	‘/ DÑ(Ô/r,   r
   c                   óú  ‡ — e Zd ZU dZdZdZdZe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d<   dZe
e   eedf   z  ed<   dZe
e   eedf   z  ed<   dZe
e   eedf   z  ed<   dZe
eedf   z  ed<   dZe
e   eedf   z  ed<   dZe
e   eedf   z  ed<   dZe
e   eedf   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(<   d)Zeed*<   d+Zeez  ed,<   ˆ fd-„Z ˆ xZ!S ).ÚAlignVisionConfigaç	  
    width_coefficient (`float`, *optional*, defaults to 2.0):
        Scaling coefficient for network width at each stage.
    depth_coefficient (`float`, *optional*, defaults to 3.1):
        Scaling coefficient for network depth at each stage.
    depth_divisor (`int`, *optional*, defaults to 8):
        A unit of network width.
    kernel_sizes (`list[int]`, *optional*, defaults to `[3, 3, 5, 3, 5, 5, 3]`):
        List of kernel sizes to be used in each block.
    in_channels (`list[int]`, *optional*, defaults to `[32, 16, 24, 40, 80, 112, 192]`):
        List of input channel sizes to be used in each block for convolutional layers.
    out_channels (`list[int]`, *optional*, defaults to `[16, 24, 40, 80, 112, 192, 320]`):
        List of output channel sizes to be used in each block for convolutional layers.
    depthwise_padding (`list[int]`, *optional*, defaults to `[]`):
        List of block indices with square padding.
    strides (`list[int]`, *optional*, defaults to `[1, 2, 2, 2, 1, 2, 1]`):
        List of stride sizes to be used in each block for convolutional layers.
    num_block_repeats (`list[int]`, *optional*, defaults to `[1, 2, 2, 3, 3, 4, 1]`):
        List of the number of times each block is to repeated.
    expand_ratios (`list[int]`, *optional*, defaults to `[1, 6, 6, 6, 6, 6, 6]`):
        List of scaling coefficient of each block.
    squeeze_expansion_ratio (`float`, *optional*, defaults to 0.25):
        Squeeze expansion ratio.
    hidden_dim (`int`, *optional*, defaults to 1280):
        The hidden dimension of the layer before the classification head.
    pooling_type (`str` or `function`, *optional*, defaults to `"mean"`):
        Type of final pooling to be applied before the dense classification head. Available options are [`"mean"`,
        `"max"`]
    batch_norm_momentum (`float`, *optional*, defaults to 0.99):
        The momentum used by the batch normalization layers.
    drop_connect_rate (`float`, *optional*, defaults to 0.2):
        The drop rate for skip connections.

    Example:

    ```python
    >>> from transformers import AlignVisionConfig, AlignVisionModel

    >>> # Initializing a AlignVisionConfig with kakaobrain/align-base style configuration
    >>> configuration = AlignVisionConfig()

    >>> # Initializing a AlignVisionModel (with random weights) from the kakaobrain/align-base style configuration
    >>> model = AlignVisionModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úalign_vision_modelÚvision_configr   Únum_channelsiX  Ú
image_sizeg       @Úwidth_coefficientgÍÌÌÌÌÌ@Údepth_coefficienté   Údepth_divisor)r   r   é   r   r8   r8   r   .Úkernel_sizes)é    é   é   é(   éP   ép   éÀ   Úin_channels)r;   r<   r=   r>   r?   r@   i@  Úout_channelsr+   Údepthwise_padding)é   r   r   r   rD   r   rD   Ústrides)rD   r   r   r   r   é   rD   Únum_block_repeats)rD   é   rH   rH   rH   rH   rH   Úexpand_ratiosg      Ð?Úsqueeze_expansion_ratioÚswishr   i 
  Ú
hidden_dimÚmeanÚpooling_typer   r   gü©ñÒMbP?Úbatch_norm_epsg®Gáz®ï?Úbatch_norm_momentumgš™™™™™É?Údrop_connect_ratec                 ó¬   •— t        | j                  «      dz  | _        dD ]"  }t        | |t	        t        | |«      «      «       Œ$ t        ‰| �  di |¤Ž y )NrF   )r9   rA   rB   rC   rE   rG   rI   r+   )ÚsumrG   r   Úsetattrr*   ÚgetattrÚsuperÚ__post_init__)ÚselfÚkwargsÚattrÚ	__class__s      €r-   rW   zAlignVisionConfig.__post_init__‹   sX   ø€ Ü!$ T×%;Ñ%;Ó!<¸qÑ!@ˆÔð
ò 
	;ˆDô �D˜$¤¤W¨T°4Ó%8Ó 9Õ:ð
	;ô 	‰ÑÑ' Ó'r,   )"r    r!   r"   r#   r$   r%   r2   r&   r'   r3   r*   Útupler4   r)   r5   r7   r9   rA   rB   rC   rE   rG   rI   rJ   r   r(   rL   rN   r   rO   rP   rQ   rW   Ú__classcell__©r[   s   @r-   r/   r/   @   s{  ø… ñ.ð` &€JØ%€Oà€L�#ÓØ47€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó7Ø"Ð�uÓ"Ø"Ð�uÓ"Ø€M�3ÓØ0E€L�$�s‘)˜e C¨ H™oÑ-ÓEØ/M€K��c‘˜U 3¨ 8™_Ñ,ÓMØ0O€L�$�s‘)˜e C¨ H™oÑ-ÓOØ02Ð�t˜e C¨ H™oÑ-Ó2Ø+@€GˆT�#‰Y˜˜s C˜x™Ñ(Ó@Ø5JÐ�t˜C‘y 5¨¨c¨¡?Ñ2ÓJØ1F€M�4˜‘9˜u S¨# X™Ñ.ÓFØ%)Ð˜UÓ)Ø€J�ÓØ€J�ÓØ€L�#ÓØ#Ð�uÓ#Ø!€N�EÓ!Ø!%Ð˜Ó%Ø%(Ð�u˜s‘{Ó(÷(ð (r,   r/   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<   ˆ fd„Zˆ xZS )ÚAlignConfiga  
    temperature_init_value (`float`, *optional*, defaults to 1.0):
        The initial value of the *temperature* parameter. Default is used as per the original ALIGN implementation.

    Example:

    ```python
    >>> from transformers import AlignConfig, AlignModel

    >>> # Initializing a AlignConfig with kakaobrain/align-base style configuration
    >>> configuration = AlignConfig()

    >>> # Initializing a AlignModel (with random weights) from the kakaobrain/align-base style configuration
    >>> model = AlignModel(configuration)

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

    >>> # We can also initialize a AlignConfig from a AlignTextConfig and a AlignVisionConfig
    >>> from transformers import AlignTextConfig, AlignVisionConfig

    >>> # Initializing ALIGN Text and Vision configurations
    >>> config_text = AlignTextConfig()
    >>> config_vision = AlignVisionConfig()

    >>> config = AlignConfig(text_config=config_text, vision_config=config_vision)
    ```Úalign)r   r1   Nr   r1   i€  Úprojection_dimg      ð?Útemperature_init_valuer   r   c                 ó¸  •— | 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 `AlignTextConfig` with default values.zT`vision_config` is `None`. initializing the `AlignVisionConfig` with default values.r+   )
r   r
   ÚloggerÚinfoÚ
isinstanceÚdictr1   r/   rV   rW   )rX   rY   r[   s     €r-   rW   zAlignConfig.__post_init__Ã   s§   ø€ Ø×ÑÐ#Ü.Ó0ˆDÔÜ�K‰KÐjÕkÜ˜×(Ñ(¬$Ô/Ü.ÑB°×1AÑ1AÑBˆDÔà×ÑÐ%Ü!2Ó!4ˆDÔÜ�K‰KÐnÕoÜ˜×*Ñ*¬DÔ1Ü!2Ñ!H°T×5GÑ5GÑ!HˆDÔä‰ÑÑ' Ó'r,   )r    r!   r"   r#   r$   r
   r/   Úsub_configsr   rh   r   r'   r1   rb   r&   rc   r)   r   rW   r]   r^   s   @r-   r`   r`   ›   sn   ø… ñð8 €JØ"1ÐDUÑV€Kà26€K�Ð(Ñ(¨4Ñ/Ó6Ø48€M�4Ð*Ñ*¨TÑ1Ó8Ø€N�CÓØ$'Ð˜EÓ'Ø#Ð�uÓ#÷(ð (r,   r`   )r
   r/   r`   N)r#   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Ú
get_loggerr    re   r
   r/   r`   Ú__all__r+   r,   r-   ú<module>ro      s³   ðñ  å .å 3ß ,ð 
ˆ×	Ñ	˜HÓ	%€ñ Ð2Ô3Øô"0Ð&ó "0ó ó 4ð"0ñJ Ð2Ô3ØôV(Ð(ó V(ó ó 4ðV(ñr Ð2Ô3Øô3(Ð"ó 3(ó ó 4ð3(òl B�r,   