
    i0                     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DeBERTa model configuration    )strict   )PreTrainedConfig)auto_docstringzmicrosoft/deberta-base)
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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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e   z  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(<    fd)Z" xZ#S )*DebertaConfiga  
    relative_attention (`bool`, *optional*, defaults to `False`):
        Whether use relative position encoding.
    max_relative_positions (`int`, *optional*, defaults to -1):
        The range of relative positions `[-max_position_embeddings, max_position_embeddings]`. Use the same value
        as `max_position_embeddings`.
    position_biased_input (`bool`, *optional*, defaults to `True`):
        Whether add absolute position embedding to content embedding.
    pos_att_type (`list[str]`, *optional*):
        The type of relative position attention, it can be a combination of `["p2c", "c2p"]`, e.g. `["p2c"]`,
        `["p2c", "c2p"]`.
    pooler_dropout (`float`, *optional*, defaults to `0`):
        Dropout rate in the pooler module.
    pooler_hidden_act (`str`, *optional*, defaults to `"gelu"`):
        Activation function used in the dropout module.
    legacy (`bool`, *optional*, defaults to `True`):
        Whether or not the model should use the legacy `LegacyDebertaOnlyMLMHead`, which does not work properly
        for mask infilling tasks.

    Example:

    ```python
    >>> from transformers import DebertaConfig, DebertaModel

    >>> # Initializing a DeBERTa microsoft/deberta-base style configuration
    >>> configuration = DebertaConfig()

    >>> # Initializing a model (with random weights) from the microsoft/deberta-base style configuration
    >>> model = DebertaModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```debertaiY  
vocab_sizei   hidden_size   num_hidden_layersnum_attention_headsi   intermediate_sizegelu
hidden_actg?hidden_dropout_probattention_probs_dropout_probi   max_position_embeddingsr   type_vocab_sizeg{Gz?initializer_rangegHz>layer_norm_epsFrelative_attentionmax_relative_positionsNpad_token_idbos_token_ideos_token_idTposition_biased_inputpos_att_typeg        pooler_dropoutpooler_hidden_actlegacytie_word_embeddingsc                 8   t        | j                  t              rJ| j                  j                         j	                  d      D cg c]  }|j                          c}| _        |j                  d| j                        | _        t        | (  di | y c c}w )N|pooler_hidden_size )
isinstancer    strlowersplitstripgetr   r'   super__post_init__)selfkwargsx	__class__s      /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/deberta/configuration_deberta.pyr0   zDebertaConfig.__post_init__U   sw    d''-484E4E4K4K4M4S4STW4X Yq YD"(**-A4CSCS"T'' !Zs   B)$__name__
__module____qualname____doc__
model_typer   int__annotations__r   r   r   r   r   r*   r   floatr   r   r   r   r   r   boolr   r   r   r   listr   r    r!   r"   r#   r$   r0   __classcell__)r4   s   @r5   r	   r	      s:    D JJKs!!!s!J'**03 %#+3#&S&OS#u# NE $$"$C$ L#* #L#*#+/L#S	/D(/"&4&+/L#S	/D(/"%NECK%#s#FD $$( (    r	   N)	r9   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r(   rA   r5   <module>rF      sK    " . 3 # 34C($ C(  5C(L 
rA   