o
    ei                     @   s@   d Z ddlmZ ddlmZ eeZG dd deZdgZ	dS )zSalesforce CTRL configuration   )PreTrainedConfig)loggingc                       sX   e Zd ZdZdZdgZdddddZ			
													d fdd	Z  ZS )
CTRLConfiga  
    This is the configuration class to store the configuration of a [`CTRLModel`]. It is used to
    instantiate a CTRL 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
    [Salesforce/ctrl](https://huggingface.co/Salesforce/ctrl) architecture from SalesForce.

    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 246534):
            Vocabulary size of the CTRL model. Defines the number of different tokens that can be represented by the
            `inputs_ids` passed when calling [`CTRLModel`].
        n_positions (`int`, *optional*, defaults to 256):
            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).
        n_embd (`int`, *optional*, defaults to 1280):
            Dimensionality of the embeddings and hidden states.
        dff (`int`, *optional*, defaults to 8192):
            Dimensionality of the inner dimension of the feed forward networks (FFN).
        n_layer (`int`, *optional*, defaults to 48):
            Number of hidden layers in the Transformer encoder.
        n_head (`int`, *optional*, defaults to 16):
            Number of attention heads for each attention layer in the Transformer encoder.
        resid_pdrop (`float`, *optional*, defaults to 0.1):
            The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
        embd_pdrop (`int`, *optional*, defaults to 0.1):
            The dropout ratio for the embeddings.
        layer_norm_epsilon (`float`, *optional*, defaults to 1e-06):
            The epsilon to use in the layer normalization layers
        initializer_range (`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).
        pad_token_id (`int`, *optional*):
            Padding token id.
        bos_token_id (`int`, *optional*):
            Beginning of stream token id.
        eos_token_id (`int`, *optional*):
            End of stream token id.
        tie_word_embeddings (`bool`, *optional*, defaults to `True`):
            Whether to tie weight embeddings


    Examples:

    ```python
    >>> from transformers import CTRLConfig, CTRLModel

    >>> # Initializing a CTRL configuration
    >>> configuration = CTRLConfig()

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

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ctrlpast_key_valuesn_positionsn_embdn_headn_layer)max_position_embeddingshidden_sizenum_attention_headsnum_hidden_layers           0      皙?ư>{Gz?TNc                    sp   || _ || _|| _|| _|| _|| _|| _|| _|	| _|
| _	|| _
|| _|| _|| _|| _t jdi | d S )N )
vocab_sizer   r   r
   r	   dffresid_pdrop
embd_pdroplayer_norm_epsiloninitializer_rangepad_token_idbos_token_ideos_token_idtie_word_embeddings	use_cachesuper__init__)selfr   r   r   r   r
   r	   r   r   r   r   r#   r   r    r!   r"   kwargs	__class__r   i/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/transformers/models/ctrl/configuration_ctrl.pyr%   \   s    zCTRLConfig.__init__)r   r   r   r   r   r   r   r   r   r   TNNNT)	__name__
__module____qualname____doc__
model_typekeys_to_ignore_at_inferenceattribute_mapr%   __classcell__r   r   r(   r*   r      s2    ;	r   N)
r.   configuration_utilsr   utilsr   
get_loggerr+   loggerr   __all__r   r   r   r*   <module>   s   

l