Ë
    ÛÓ^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BridgeTower model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringÚloggingzBridgeTower/bridgetower-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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z  ed<   dZeed<   dZeed<   dZeed<   dZeed<   y)ÚBridgeTowerVisionConfiga“  
    stop_gradient (`bool`, *optional*, defaults to `False`):
        Whether to stop gradient for training.
    share_layernorm (`bool`, *optional*, defaults to `True`):
        Whether LayerNorm layers are shared.
    remove_last_layer (`bool`, *optional*, defaults to `False`):
        Whether to remove the last layer from the vision encoder.

    Example:

    ```python
    >>> from transformers import BridgeTowerVisionConfig

    >>> # Initializing a BridgeTower BridgeTower/bridgetower-base style configuration for the vision model
    >>> configuration = BridgeTowerVisionConfig()

    >>> # Accessing the configuration
    >>> configuration
    ```Úbridgetower_vision_modelÚvision_configé   Úhidden_sizeé   Únum_hidden_layersr   Únum_channelsé   Ú
patch_sizei   Ú
image_sizeé   Úinitializer_factorçñhãˆµøä>Úlayer_norm_epsFÚstop_gradientTÚshare_layernormÚremove_last_layerN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚbase_config_keyr   ÚintÚ__annotations__r   r   r   ÚlistÚtupler   r   Úfloatr   r   Úboolr   r   © ó    ú„/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/bridgetower/configuration_bridgetower.pyr
   r
      s¨   … ñð( ,€JØ%€Oà€K�ÓØÐ�sÓØ€L�#ÓØ46€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó6Ø47€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó7Ø&'Ð˜ ™Ó'Ø!€N�EÓ!Ø€M�4ÓØ €O�TÓ Ø#Ð�tÔ#r)   r
   c                   óF  — 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z  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dz  ed<   dZed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#<   y)$ÚBridgeTowerTextConfiga2  
    Example:

    ```python
    >>> from transformers import BridgeTowerTextConfig

    >>> # Initializing a BridgeTower BridgeTower/bridgetower-base style configuration for the text model
    >>> configuration = BridgeTowerTextConfig()

    >>> # Accessing the configuration
    >>> configuration
    ```Úbridgetower_text_modelÚtext_configiYÄ  Ú
vocab_sizer   r   r   r   Únum_attention_headsr   r   i   Úintermediate_sizeÚgeluÚ
hidden_actgš™™™™™¹?Úhidden_dropout_probÚattention_probs_dropout_probi  Úmax_position_embeddingsÚtype_vocab_sizer   r   NÚpad_token_idr   Úbos_token_idé   Úeos_token_idTÚ	use_cacheFÚ
is_decoderÚadd_cross_attention)r   r   r   r   r    r!   r/   r"   r#   r   r   r0   r   r&   r1   r3   Ústrr4   r5   r6   r7   r   r8   r9   r;   r$   r<   r'   r=   r>   r(   r)   r*   r,   r,   ?   sð   … ñð *€JØ#€Oà€J�ÓØ€K�ÓØÐ�sÓØ!Ð˜Ó!Ø&'Ð˜ ™Ó'Ø!Ð�sÓ!Ø€J�ÓØ'*Ð˜ ™Ó*Ø03Ð  %¨#¡+Ó3Ø#&Ð˜SÓ&Ø€O�SÓØ!€N�EÓ!Ø €L�#˜‘*Ó Ø €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø€IˆtÓØ€J�ÓØ %Ð˜Ô%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  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  dz  e
d<   dZeez  dz  e
d<   ˆ fd„Zˆ xZS )ÚBridgeTowerConfigaÈ  
    share_cross_modal_transformer_layers (`bool`, *optional*, defaults to `True`):
        Whether cross modal transformer layers are shared.
    share_link_tower_layers (`bool`, *optional*, defaults to `False`):
        Whether the bride/link tower layers are shared.
    link_tower_type (`str`, *optional*, defaults to `"add"`):
        Type of the bridge/link layer.
    init_layernorm_from_vision_encoder (`bool`, *optional*, defaults to `False`):
        Whether to init LayerNorm from the vision encoder.

    Example:

    ```python
    >>> from transformers import BridgeTowerModel, BridgeTowerConfig

    >>> # Initializing a BridgeTower BridgeTower/bridgetower-base style configuration
    >>> configuration = BridgeTowerConfig()

    >>> # Initializing a model from the BridgeTower/bridgetower-base style configuration
    >>> model = BridgeTowerModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úbridgetower)r.   r   TÚ$share_cross_modal_transformer_layersr2   r3   r   r   r   r   r   r   FÚshare_link_tower_layersÚaddÚlink_tower_typer   r0   é   r   Útie_word_embeddingsÚ"init_layernorm_from_vision_encoderNr.   r   c                 ó   •— |j                  dd «      }|j                  dd «      }| 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 )NÚtext_config_dictÚvision_config_dictzV`text_config` is `None`. initializing the `BridgeTowerTextConfig` with default values.zZ`vision_config` is `None`. initializing the `BridgeTowerVisionConfig` with default values.r(   )Úpopr.   r,   ÚloggerÚinfoÚ
isinstanceÚdictr   r
   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ_Ú	__class__s      €r*   rS   zBridgeTowerConfig.__post_init__“   sÉ   ø€ à�J‰JÐ)¨4Ó0ˆØ�J‰JÐ+¨TÓ2ˆà×ÑÐ#Ü4Ó6ˆDÔÜ�K‰KÐpÕqÜ˜×(Ñ(¬$Ô/Ü4ÑH°t×7GÑ7GÑHˆDÔà×ÑÐ%Ü!8Ó!:ˆDÔÜ�K‰KÐtÕuÜ˜×*Ñ*¬DÔ1Ü!8Ñ!N¸4×;MÑ;MÑ!NˆDÔä‰ÑÑ' Ó'r)   )r   r   r   r   r    r,   r
   Úsub_configsrC   r'   r#   r3   r?   r   r"   r   r&   r   rD   rF   r0   r   rH   rI   r.   rQ   r   r   rS   Ú__classcell__)rW   s   @r*   rA   rA   f   sÇ   ø… ñð2 €JØ"7ÐJaÑb€Kà15Ð(¨$Ó5Ø€J�ÓØ€K�ÓØ&'Ð˜ ™Ó'Ø!€N�EÓ!Ø$)Ð˜TÓ)Ø €O�SÓ Ø!Ð˜Ó!ØÐ�sÓØ %Ð˜Ó%Ø/4Ð&¨Ó4Ø26€K�Ð(Ñ(¨4Ñ/Ó6Ø48€M�4Ð*Ñ*¨TÑ1Ó8÷(ð (r)   rA   )rA   r,   r
   N)r   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Ú
get_loggerr   rN   r
   r,   rA   Ú__all__r(   r)   r*   ú<module>r_      s°   ðñ &å .å 3ß ,ð 
ˆ×	Ñ	˜HÓ	%€ñ Ð9Ô:Øô!$Ð.ó !$ó ó ;ð!$ñH Ð9Ô:Øô"&Ð,ó "&ó ó ;ð"&ñJ Ð9Ô:Øô<(Ð(ó <(ó ó ;ð<(ò~ T�r)   