
    i                         d dl mZ ddlmZ ddlmZ  ed      e G d de                    Z ed      e G d	 d
e                    Zd
gZy)    )strict   )PreTrainedConfig)auto_docstringz&PaddlePaddle/SLANeXt_wired_safetensors)
checkpointc                   <   e Zd ZU 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e   z  eeef   z  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   eedf   z  ed <   d!Zeed"<   y#)$SLANeXtVisionConfiga  
    output_channels (`int`, *optional*, defaults to 256):
        Dimensionality of the output channels in the Patch Encoder.
    use_abs_pos (`bool`, *optional*, defaults to `True`):
        Whether to use absolute position embedding.
    use_rel_pos (`bool`, *optional*, defaults to `True`):
        Whether to use relative position embedding.
    window_size (`int`, *optional*, defaults to 14):
        Window size for relative position.
    global_attn_indexes (`list[int]`, *optional*, defaults to `[2, 5, 8, 11]`):
        The indexes of the global attention layers.
    mlp_dim (`int`, *optional*, defaults to 3072):
        The dimensionality of the MLP layer in the Transformer encoder.
    vision_configi   hidden_size   output_channels   num_hidden_layersnum_attention_headsr   num_channels   
image_size   
patch_sizegelu
hidden_actgư>layer_norm_epsg        attention_dropoutg|=initializer_rangeTqkv_biasuse_abs_posuse_rel_pos   window_size)            .global_attn_indexesi   mlp_dimN)__name__
__module____qualname____doc__base_config_keyr   int__annotations__r   r   r   r   r   r   listtupler   strr   floatr   r   r   boolr   r   r   r$   r%        /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/slanext/configuration_slanext.pyr	   r	      s     &OKOSs!!L#J46Jd3i%S/16J!NE!%(us{($u$HdKKK7DcU38_4DGSr3   r	   c                        e Zd ZU dZdZdeiZdZeez  d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<    fdZ xZS )SLANeXtConfiga  
    vision_config (`dict` or [`SLANeXtVisionConfig`], *optional*):
        Configuration for the vision encoder. If `None`, a default [`SLANeXtVisionConfig`] is used.
    post_conv_in_channels (`int`, *optional*, defaults to 256):
        Number of input channels for the post-encoder convolution layer.
    post_conv_out_channels (`int`, *optional*, defaults to 512):
        Number of output channels for the post-encoder convolution layer.
    out_channels (`int`, *optional*, defaults to 50):
        Vocabulary size for the table structure token prediction head, i.e., the number of distinct structure
        tokens the model can predict.
    hidden_size (`int`, *optional*, defaults to 512):
        Dimensionality of the hidden states in the attention GRU cell and the structure/location prediction heads.
    max_text_length (`int`, *optional*, defaults to 500):
        Maximum number of autoregressive decoding steps (tokens) for the structure and location decoder.
    slanextr
   Nr   post_conv_in_channelsr   post_conv_out_channels2   out_channelsr   i  max_text_lengthc                     | j                   t               | _         n4t        | j                   t              rt        di | j                   | _         t	        |   di | y )Nr2   )r
   r	   
isinstancedictsuper__post_init__)selfkwargs	__class__s     r4   rA   zSLANeXtConfig.__post_init___   sP    %!4!6D**D1!4!Jt7I7I!JD''r3   )r&   r'   r(   r)   
model_typer	   sub_configsr
   r?   r,   r8   r+   r9   r;   r   r<   rA   __classcell__)rD   s   @r4   r6   r6   B   sm      J"$78K7;M4--4;!$3$"%C%L#KOS( (r3   r6   N)	huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   r6   __all__r2   r3   r4   <module>rL      sr   , / 3 # CD!* !  E!H CD ($  (  E (F 
r3   