Ë
    T^(hS  ã                   ó`   — 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RWKV configurationé   )ÚPretrainedConfig)Úloggingc                   óH   ‡ — e Zd ZdZdZddiZ	 	 	 	 	 	 	 	 	 	 	 	 dˆ fd„	Zˆ xZS )Ú
RwkvConfigaÝ  
    This is the configuration class to store the configuration of a [`RwkvModel`]. It is used to instantiate a RWKV
    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 RWVK-4
    [RWKV/rwkv-4-169m-pile](https://huggingface.co/RWKV/rwkv-4-169m-pile) 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 50277):
            Vocabulary size of the RWKV model. Defines the number of different tokens that can be represented by the
            `inputs_ids` passed when calling [`RwkvModel`].
        context_length (`int`, *optional*, defaults to 1024):
            The maximum sequence length that this model can be used with in a single forward (using it in RNN mode
            lets use any sequence length).
        hidden_size (`int`, *optional*, defaults to 4096):
            Dimensionality of the embeddings and hidden states.
        num_hidden_layers (`int`, *optional*, defaults to 32):
            Number of hidden layers in the model.
        attention_hidden_size (`int`, *optional*):
            Dimensionality of the attention hidden states. Will default to `hidden_size` if unset.
        intermediate_size (`int`, *optional*):
            Dimensionality of the inner feed-forward layers. Will default to 4 times `hidden_size` if unset.
        layer_norm_epsilon (`float`, *optional*, defaults to 1e-05):
            The epsilon to use in the layer normalization layers.
        bos_token_id (`int`, *optional*, defaults to 0):
            The id of the beginning of sentence token in the vocabulary. Defaults to 0 as RWKV uses the same tokenizer
            as GPTNeoX.
        eos_token_id (`int`, *optional*, defaults to 0):
            The id of the end of sentence token in the vocabulary. Defaults to 0 as RWKV uses the same tokenizer as
            GPTNeoX.
        rescale_every (`int`, *optional*, defaults to 6):
            At inference, the hidden states (and weights of the correponding output layers) are divided by 2 every
            `rescale_every` layer. If set to 0 or a negative number, no rescale is done.
        tie_word_embeddings (`bool`, *optional*, defaults to `False`):
            Whether or not to tie the word embeddings with the input token embeddings.
        use_cache (`bool`, *optional*, defaults to `True`):
            Whether or not the model should return the last state.


    Example:

    ```python
    >>> from transformers import RwkvConfig, RwkvModel

    >>> # Initializing a Rwkv configuration
    >>> configuration = RwkvConfig()

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

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```ÚrwkvÚmax_position_embeddingsÚcontext_lengthc                 óÜ   •— || _         || _        || _        || _        |�|n|| _        |�|nd|z  | _        || _        |
| _        || _        || _	        |	| _
        t        ‰| �0  d|||	dœ|¤Ž y )Né   )Útie_word_embeddingsÚbos_token_idÚeos_token_id© )Ú
vocab_sizer	   Úhidden_sizeÚnum_hidden_layersÚattention_hidden_sizeÚintermediate_sizeÚlayer_norm_epsilonÚrescale_everyÚ	use_cacher   r   ÚsuperÚ__init__)Úselfr   r	   r   r   r   r   r   r   r   r   r   r   ÚkwargsÚ	__class__s                 €úi/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/rwkv/configuration_rwkv.pyr   zRwkvConfig.__init__V   s•   ø€ ð  %ˆŒØ,ˆÔØ&ˆÔØ!2ˆÔØ>SÐ>_Ñ%:ÐepˆÔ"Ø6GÐ6SÑ!2ÐYZÐ]hÑYhˆÔØ"4ˆÔØ*ˆÔØ"ˆŒà(ˆÔØ(ˆÔä‰Ñð 	
Ø 3À,Ð]iñ	
Ømsó	
ó    )ieÄ  i   i   é    NNgñhãˆµøä>é    r    é   FT)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚattribute_mapr   Ú__classcell__)r   s   @r   r   r      sK   ø„ ñ7ðr €JØ.Ð0@ÐA€Mð ØØØØ"ØØØØØØ!Ø÷
ñ 
r   r   N)
r%   Úconfiguration_utilsr   Úutilsr   Ú
get_loggerr"   Úloggerr   Ú__all__r   r   r   ú<module>r.      s=   ðñ  å 3Ý ð 
ˆ×	Ñ	˜HÓ	%€ô\
Ð!ô \
ð~ ˆ.�r   