Ë
    ÜÓ^jþ  ã                   ój   — d Z ddlmZ ddlmZ ddlmZ  ed¬«      e G d„ d	e«      «       «       Zd	gZy
)zUDOP model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringzmicrosoft/udop-large)Ú
checkpointc                   ó  ‡ — e Zd ZU dZdZdgZddd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dz  e	d<   dZee	d<   dZee	d<   dZee	d<   dZee   d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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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	d/<   d Z'ee	d0<   ˆ fd1„Z(d2„ Z)ˆ xZ*S )3Ú
UdopConfiga“  
    relative_attention_num_buckets (`int`, *optional*, defaults to 32):
        The number of buckets to use for each attention layer.
    relative_attention_max_distance (`int`, *optional*, defaults to 128):
        The maximum distance of the longer sequences for the bucket separation.
    relative_bias_args (`list[dict]`, *optional*, defaults to `[{'type': '1d'}, {'type': 'horizontal'}, {'type': 'vertical'}]`):
        A list of dictionaries containing the arguments for the relative bias layers.
    feed_forward_proj (`string`, *optional*, defaults to `"relu"`):
        Type of feed forward layer to be used. Should be one of `"relu"` or `"gated-gelu"`. Udopv1.1 uses the
        `"gated-gelu"` feed forward projection. Original Udop uses `"relu"`.
    max_2d_position_embeddings (`int`, *optional*, defaults to 1024):
        The maximum absolute position embeddings for relative position encoding.
    ÚudopÚpast_key_valuesÚd_modelÚ	num_headsÚ
num_layers)Úhidden_sizeÚnum_attention_headsÚnum_hidden_layersi±�  Ú
vocab_sizei   é@   Úd_kvi   Úd_ffé   NÚnum_decoder_layersé   é    Úrelative_attention_num_bucketsé€   Úrelative_attention_max_distanceÚrelative_bias_argsgš™™™™™¹?Údropout_rateg�íµ ÷Æ°>Úlayer_norm_epsilong      ð?Úinitializer_factorÚreluÚfeed_forward_projTÚis_encoder_decoderÚ	use_cacher   Úpad_token_idé   Úeos_token_idÚmax_2d_position_embeddingséà   Ú
image_sizeÚ
patch_sizer   Únum_channelsFÚ
is_decoderÚadd_cross_attentionÚtie_word_embeddingsc                 óD  •— | j                   €ddiddiddig| _         | j                  �| j                  n| j                  | _        | j                  j	                  d«      }|d   | _        |d   dk(  | _        |j                  d	d «       d
| _        t        ‰| �(  di |¤Ž y )NÚtypeÚ1dÚ
horizontalÚverticalú-éÿÿÿÿr   Úgatedr/   T© )r   r   r   r"   ÚsplitÚdense_act_fnÚis_gated_actÚpopr/   ÚsuperÚ__post_init__)ÚselfÚkwargsÚact_infoÚ	__class__s      €úv/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/udop/configuration_udop.pyr>   zUdopConfig.__post_init__E   s±   ø€ Ø×"Ñ"Ð*Ø(.° ~¸ÀÐ7MÐPVÐXbÐOcÐ&dˆDÔ#ð (,×'>Ñ'>Ð'JˆD×#Ò#ÐPT×P_ÑP_ð 	Ôð ×)Ñ)×/Ñ/°Ó4ˆØ$ R™LˆÔØ$ Q™K¨7Ñ2ˆÔà�
‰
Ð(¨$Ô/Ø#'ˆÔ Ü‰ÑÑ' Ó'ó    c                 ó´   — | j                   j                  d«      }t        |«      dkD  r|d   dk7  st        |«      dkD  rt        d| j                   › d�«      ‚y)	zOPart of `@strict`-powered validation. Validates the architecture of the config.r5   r&   r   r7   é   z`feed_forward_proj`: z¨ is not a valid activation function of the dense layer.Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. 'gated-gelu' or 'relu'N)r"   r9   ÚlenÚ
ValueError)r?   rA   s     rC   Úvalidate_architecturez UdopConfig.validate_architectureU   sf   € à×)Ñ)×/Ñ/°Ó4ˆÜˆx‹=˜1Ò ¨!¡°Ò!7¼3¸x»=È1Ò;LÜØ'¨×(>Ñ(>Ð'?ð @)ð )óð ð <MrD   )+Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚattribute_mapr   ÚintÚ__annotations__r   r   r   r   r   r   r   r   r   ÚlistÚdictr   Úfloatr   r    r"   Ústrr#   Úboolr$   r%   r'   r(   r*   Útupler+   r,   r-   r.   r/   r>   rI   Ú__classcell__)rB   s   @rC   r	   r	      s  ø… ñð €JØ#4Ð"5ÐØ$-ÀkÐhtÑu€Mà€J�ÓØ€GˆSÓØ€Dˆ#ƒNØ€Dˆ#ÓØ€J�ÓØ%)Ð˜˜d™
Ó)Ø€IˆsÓØ*,Ð" CÓ,Ø+.Ð# SÓ.Ø,0Ð˜˜T™
 TÑ)Ó0Ø #€L�%˜#‘+Ó#Ø $Ð˜Ó$Ø #Ð˜Ó#Ø#Ð�sÓ#Ø#Ð˜Ó#Ø€IˆtÓØ €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø&*Ð Ó*Ø47€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó7Ø46€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó6Ø€L�#ÓØ€J�ÓØ %Ð˜Ó%Ø $Ð˜Ó$ô(ö rD   r	   N)	rM   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r8   rD   rC   ú<module>r^      sJ   ðñ å .å 3Ý #ñ Ð1Ô2ØôEÐ!ó Eó ó 3ðEðP ˆ.�rD   