Ë
    T^(h  ã                   ó`   — d Z ddlmZ ddlmZ  ej
                  e«      Z G d„ de«      ZdgZ	y)zOPT model configurationé   )ÚPretrainedConfig)Úloggingc                   óV   ‡ — e Zd ZdZdZdgZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dˆ fd„	Zˆ xZS )Ú	OPTConfiga—  
    This is the configuration class to store the configuration of a [`OPTModel`]. It is used to instantiate a OPT model
    according to the specified arguments, defining the model architecture. Instantiating a configuration with the
    defaults will yield a similar configuration to that of the OPT
    [facebook/opt-350m](https://huggingface.co/facebook/opt-350m) architecture.

    Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
    documentation from [`PretrainedConfig`] for more information.


    Args:
        vocab_size (`int`, *optional*, defaults to 50272):
            Vocabulary size of the OPT model. Defines the number of different tokens that can be represented by the
            `inputs_ids` passed when calling [`OPTModel`]
        hidden_size (`int`, *optional*, defaults to 768):
            Dimensionality of the layers and the pooler layer.
        num_hidden_layers (`int`, *optional*, defaults to 12):
            Number of decoder layers.
        ffn_dim (`int`, *optional*, defaults to 3072):
            Dimensionality of the "intermediate" (often named feed-forward) layer in decoder.
        num_attention_heads (`int`, *optional*, defaults to 12):
            Number of attention heads for each attention layer in the Transformer decoder.
        activation_function (`str` or `function`, *optional*, defaults to `"relu"`):
            The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
            `"relu"`, `"silu"` and `"gelu_new"` are supported.
        max_position_embeddings (`int`, *optional*, defaults to 2048):
            The maximum sequence length that this model might ever be used with. Typically set this to something large
            just in case (e.g., 512 or 1024 or 2048).
        do_layer_norm_before (`bool`, *optional*, defaults to `True`):
            Whether to perform layer normalization before the attention block.
        word_embed_proj_dim (`int`, *optional*):
            `word_embed_proj_dim` can be set to down-project word embeddings, *e.g.* `opt-350m`. Defaults to
            `hidden_size`.
        dropout (`float`, *optional*, defaults to 0.1):
            The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
        attention_dropout (`float`, *optional*, defaults to 0.0):
            The dropout ratio for the attention probabilities.
        layerdrop (`float`, *optional*, defaults to 0.0):
            The LayerDrop probability. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556) for more
            details.
        init_std (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        use_cache (`bool`, *optional*, defaults to `True`):
            Whether or not the model should return the last key/values attentions (not used by all models).
        enable_bias (`bool`, *optional*, defaults to `True`):
            Whether or not if the linear layers in the attention blocks should use the bias term.
        layer_norm_elementwise_affine (`bool`, *optional*, defaults to `True`):
            Whether or not if the layer norms should have learnable parameters.

    Example:

    ```python
    >>> from transformers import OPTConfig, OPTModel

    >>> # Initializing a OPT facebook/opt-large style configuration
    >>> configuration = OPTConfig()

    >>> # Initializing a model (with random weights) from the facebook/opt-large style configuration
    >>> model = OPTModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚoptÚpast_key_valuesc                 ó"  •— t        ‰| �  d|||dœ|¤Ž || _        || _        || _        |�|n|| _        || _        || _        || _        |	| _	        |
| _
        || _        || _        || _        || _        || _        || _        || _        || _        y )N)Úpad_token_idÚbos_token_idÚeos_token_id© )ÚsuperÚ__init__Ú
vocab_sizeÚmax_position_embeddingsÚnum_attention_headsÚword_embed_proj_dimÚffn_dimÚhidden_sizeÚnum_hidden_layersÚdropoutÚattention_dropoutÚactivation_functionÚinit_stdÚ	layerdropÚ	use_cacheÚdo_layer_norm_beforeÚenable_biasÚlayer_norm_elementwise_affineÚ_remove_final_layer_norm)Úselfr   r   r   r   r   r   r    r   r   r   r   r   r   r   r   r
   r   r   r   r   ÚkwargsÚ	__class__s                         €úg/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/opt/configuration_opt.pyr   zOPTConfig.__init__\   sº   ø€ ô0 	‰Ñð 	
Ø%Ø%Ø%ñ	
ð ò		
ð %ˆŒØ'>ˆÔ$Ø#6ˆÔ Ø:MÐ:YÑ#6Ð_jˆÔ ØˆŒØ&ˆÔØ!2ˆÔØˆŒØ!2ˆÔØ#6ˆÔ Ø ˆŒØ"ˆŒØ"ˆŒØ$8ˆÔ!à&ˆÔØ-JˆÔ*ð
 )AˆÕ%ó    )i`Ä  i   é   i   i   TFNgš™™™™™¹?ç        r&   Úrelur'   g{®Gáz”?Té   é   r*   TT)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferencer   Ú__classcell__)r#   s   @r$   r   r      sc   ø„ ñ>ð@ €JØ#4Ð"5Ðð ØØØØ $Ø!Ø!&Ø ØØØØ"ØØØØØØØØ&*÷+3Añ 3Ar%   r   N)
r.   Úconfiguration_utilsr   Úutilsr   Ú
get_loggerr+   Úloggerr   Ú__all__r   r%   r$   ú<module>r7      s?   ðñ å 3Ý ð 
ˆ×	Ñ	˜HÓ	%€ôwAÐ ô wAðt ˆ-�r%   