§
    ‚Štj!  ã                   ó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dS )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<   dS )Ú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© ó    úk/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/align/configuration_align.pyr
   r
      s<  € € € € € € ðð ð  $€JØ#€Oà€J�ÐÐÑØ€K�ÐÐÑØÐ�sÐÐÑØ!Ð˜Ð!Ð!Ñ!Ø!Ð�sÐ!Ð!Ñ!Ø€J�ÐÐÑØ'*Ð˜ ™Ð*Ð*Ñ*Ø03Ð  %¨#¡+Ð3Ð3Ñ3Ø#&Ð˜SÐ&Ð&Ñ&Ø€O�SÐÐÑØ#Ð�uÐ#Ð#Ñ#Ø!€N�EÐ!Ð!Ñ!Ø €L�#˜‘*Ð Ð Ñ Ø#€L�#˜‘*Ð#Ð#Ñ#Ø+/€L�#˜˜Sœ	‘/ DÑ(Ð/Ð/Ñ/Ð/Ð/r,   r
   c                   óT  ‡ — 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          ¦   «         j        di |¤Ž d S )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Ô%8Ñ 9Ô 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Ð7Ñ7Ø"Ð�uÐ"Ð"Ñ"Ø"Ð�uÐ"Ð"Ñ"Ø€M�3ÐÐÑØ0E€L�$�s”)˜e C¨ HœoÑ-ÐEÐEÑEØ/M€K��c”˜U 3¨ 8œ_Ñ,ÐMÐMÑMØ0O€L�$�s”)˜e C¨ HœoÑ-ÐOÐOÑOØ02Ð�t˜e C¨ HœoÑ-Ð2Ð2Ñ2Ø+@€GˆT�#ŒY˜˜s C˜xœÑ(Ð@Ð@Ñ@Ø5JÐ�t˜C”y 5¨¨c¨¤?Ñ2ÐJÐJÑJØ1F€M�4˜”9˜u S¨# XœÑ.ÐFÐFÑ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                               d¦  «         n0t	          | j         t
          ¦  «        rt          di | j         ¤Ž| _         | j        €.t          ¦   «         | _        t                               d¦  «         n0t	          | j        t
          ¦  «        rt          di | j        ¤Ž| _         t          ¦   «         j	        di |¤Ž d S )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Ô0ˆDÔÝ�KŠKÐjÑkÔkÐkÐkÝ˜Ô(­$Ñ/Ô/ð 	CÝ.ÐBÐB°Ô1AÐBÐBˆDÔàÔÐ%Ý!2Ñ!4Ô!4ˆDÔÝ�KŠKÐnÑoÔoÐoÐoÝ˜Ô*­DÑ1Ô1ð 	IÝ!2Ð!HÐ!H°TÔ5GÐ!HÐ!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`   ›   sÁ   ø€ € € € € € ðð ð8 €JØ"1ÐDUÐVÐV€Kà26€K�Ð(Ñ(¨4Ñ/Ð6Ð6Ñ6Ø48€M�4Ð*Ñ*¨TÑ1Ð8Ð8Ñ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      sj  ðð  Ð à .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,ð 
ˆÔ	˜HÑ	%Ô	%€ð €Ð2Ð3Ñ3Ô3Øð"0ð "0ð "0ð "0ð "0Ð&ñ "0ô "0ñ „ñ 4Ô3ð"0ðJ €Ð2Ð3Ñ3Ô3ØðV(ð V(ð V(ð V(ð V(Ð(ñ V(ô V(ñ „ñ 4Ô3ðV(ðr €Ð2Ð3Ñ3Ô3Øð3(ð 3(ð 3(ð 3(ð 3(Ð"ñ 3(ô 3(ñ „ñ 4Ô3ð3(ðl BÐ
AÐ
A€€€r,   