
    Z j                     d    S r SSKJr  SSKJr  SSKJr  \" SS9\ " S S	\5      5       5       rS	/rg
)zUDOP model configuration    )strict   )PreTrainedConfig)auto_docstringzmicrosoft/udop-large)
checkpointc                     ^  \ rS rSr% SrSrS/rSSSS.rS	r\	\
S
'   Sr\	\
S'   Sr\	\
S'   Sr\	\
S'   Sr\	\
S'   Sr\	S-  \
S'   Sr\	\
S'   Sr\	\
S'   Sr\	\
S'   Sr\\   S-  \
S'   Sr\\	-  \
S'   Sr\\
S'   Sr\\
S'   Sr\\
S '   S!r\\
S"'   S!r\\
S#'   S$r\	S-  \
S%'   S&r \	\\	   -  S-  \
S''   Sr!\	\
S('   S)r"\	\\	   -  \#\	\	4   -  \
S*'   Sr$\	\\	   -  \#\	\	4   -  \
S+'   S,r%\	\
S-'   S.r&\\
S/'   S.r'\\
S0'   S!r(\\
S1'   U 4S2 jr)S3 r*S4r+U =r,$ )5
UdopConfig   ac  
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                 J  > U R                   c  SS0SS0SS0/U l         U R                  b  U R                  OU R                  U l        U R                  R	                  S5      nUS   U l        US   S:H  U l        UR                  S	S 5        S
U l        [        TU ](  " S0 UD6  g )Ntype1d
horizontalvertical-r   gatedr0   T )r   r   r   r#   splitdense_act_fnis_gated_actpopr0   super__post_init__)selfkwargsact_info	__class__s      |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/udop/configuration_udop.pyr?   UdopConfig.__post_init__E   s    ""*(.~7MPVXbOc&dD# (,'>'>'JD##PTP_P_ 	 ))//4$RL$QK72

($/#' ''    c                     U R                   R                  S5      n[        U5      S:  a	  US   S:w  d  [        U5      S:  a  [        SU R                    S35      eg)	zOPart of `@strict`-powered validation. Validates the architecture of the config.r6   r'   r   r8      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#   r:   len
ValueError)r@   rB   s     rD   validate_architecture UdopConfig.validate_architectureU   sf    ))//4x=1!!73x=1;L'(>(>'? @) )  <MrF   )r;   r<   r   r   r0   )-__name__
__module____qualname____firstlineno____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/   r0   r?   rK   __static_attributes____classcell__)rC   s   @rD   r	   r	      s    J#4"5$-khtuMJGSD#ND#J%)d
)Is*,"C,+.#S.,0T
T)0 #L%#+# $$ ###s###It L#* +,L#S	/D(,&**47Jd3i%S/1746Jd3i%S/16L#J %% $$(  rF   r	   N)	rQ   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r9   rF   rD   <module>rc      sJ     . 3 # 12E! E  3EP .rF   