
    is                     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MobileBERT model configuration    )strict   )PreTrainedConfig)auto_docstringzgoogle/mobilebert-uncased)
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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#<   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d*<    fd+Z" xZ#S ),MobileBertConfigaV  
    embedding_size (`int`, *optional*, defaults to 128):
        The dimension of the word embedding vectors.
    trigram_input (`bool`, *optional*, defaults to `True`):
        Use a convolution of trigram as input.
    use_bottleneck (`bool`, *optional*, defaults to `True`):
        Whether to use bottleneck in BERT.
    intra_bottleneck_size (`int`, *optional*, defaults to 128):
        Size of bottleneck layer output.
    use_bottleneck_attention (`bool`, *optional*, defaults to `False`):
        Whether to use attention inputs from the bottleneck transformation.
    key_query_shared_bottleneck (`bool`, *optional*, defaults to `True`):
        Whether to use the same linear transformation for query&key in the bottleneck.
    num_feedforward_networks (`int`, *optional*, defaults to 4):
        Number of FFNs in a block.
    normalization_type (`str`, *optional*, defaults to `"no_norm"`):
        The normalization type in MobileBERT.

    Examples:

    ```python
    >>> from transformers import MobileBertConfig, MobileBertModel

    >>> # Initializing a MobileBERT configuration
    >>> configuration = MobileBertConfig()

    >>> # Initializing a model (with random weights) from the configuration above
    >>> model = MobileBertModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
    
mobileberti:w  
vocab_sizei   hidden_size   num_hidden_layers   num_attention_headsintermediate_sizerelu
hidden_actg        hidden_dropout_probg?attention_probs_dropout_probmax_position_embeddings   type_vocab_sizeg{Gz?initializer_rangeg-q=layer_norm_epsr   Npad_token_id   embedding_sizeTtrigram_inputuse_bottleneckintra_bottleneck_sizeFuse_bottleneck_attentionkey_query_shared_bottlenecknum_feedforward_networksno_normnormalization_typeclassifier_activationclassifier_dropouttie_word_embeddingsc                     | j                   r| j                  | _        n| j                  | _        t	        |   di | y )N )r   r    true_hidden_sizer   super__post_init__)selfkwargs	__class__s     /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/mobilebert/configuration_mobilebert.pyr-   zMobileBertConfig.__post_init__V   s8    $($>$>D!$($4$4D!''    )$__name__
__module____qualname____doc__
model_typer   int__annotations__r   r   r   r   r   strr   floatr   r   r   r   r   r   r   r   boolr   r    r!   r"   r#   r%   r&   r'   r(   r-   __classcell__)r0   s   @r1   r	   r	      s.    D JJKs   s J'**03 %#+3#&S&OS#u#!NE! L#* NCM4ND!$3$%*d*(,,$%c%''"&4&-1d*1 $$( (r2   r	   N)	r6   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r*   r2   r1   <module>rB      sK    % . 3 # 67C(' C(  8C(L 
r2   