Ë
    T^(hÇ"  ã                   ót   — d Z ddlmZmZm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ProphetNet model configurationé    )ÚCallableÚOptionalÚUnioné   )ÚPretrainedConfig)Úloggingc            6       ó´  ‡ — e Zd ZdZdZdgZddiZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d#dee   dee	e
ef      dee   d	ee   d
ee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   dee   f4ˆ fd„Zed efd!„«       Zej"                  d"„ «       Zˆ xZS )$ÚProphetNetConfiga�  
    This is the configuration class to store the configuration of a [`ProphetNetModel`]. It is used to instantiate a
    ProphetNet 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 ProphetNet
    [microsoft/prophetnet-large-uncased](https://huggingface.co/microsoft/prophetnet-large-uncased) architecture.

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

    Args:
        activation_dropout (`float`, *optional*, defaults to 0.1):
            The dropout ratio for activations inside the fully connected layer.
        activation_function (`str` or `function`, *optional*, defaults to `"gelu"`):
            The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
            `"relu"`, `"silu"` and `"gelu_new"` are supported.
        vocab_size (`int`, *optional*, defaults to 30522):
            Vocabulary size of the ProphetNET model. Defines the number of different tokens that can be represented by
            the `inputs_ids` passed when calling [`ProphetNetModel`].
        hidden_size (`int`, *optional*, defaults to 1024):
            Dimensionality of the layers and the pooler layer.
        encoder_ffn_dim (`int`, *optional*, defaults to 4096):
            Dimensionality of the "intermediate" (often named feed-forward) layer in decoder.
        num_encoder_layers (`int`, *optional*, defaults to 12):
            Number of encoder layers.
        num_encoder_attention_heads (`int`, *optional*, defaults to 16):
            Number of attention heads for each attention layer in the Transformer encoder.
        decoder_ffn_dim (`int`, *optional*, defaults to 4096):
            Dimensionality of the `intermediate` (often named feed-forward) layer in decoder.
        num_decoder_layers (`int`, *optional*, defaults to 12):
            Number of decoder layers.
        num_decoder_attention_heads (`int`, *optional*, defaults to 16):
            Number of attention heads for each attention layer in the Transformer decoder.
        attention_dropout (`float`, *optional*, defaults to 0.1):
            The dropout ratio for the attention probabilities.
        dropout (`float`, *optional*, defaults to 0.1):
            The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
        max_position_embeddings (`int`, *optional*, defaults to 512):
            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).
        init_std (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        add_cross_attention (`bool`, *optional*, defaults to `True`):
            Whether cross-attention layers should be added to the model.
        is_encoder_decoder (`bool`, *optional*, defaults to `True`):
            Whether this is an encoder/decoder model.
        pad_token_id (`int`, *optional*, defaults to 1)
            Padding token id.
        bos_token_id (`int`, *optional*, defaults to 0)
            Beginning of stream token id.
        eos_token_id (`int`, *optional*, defaults to 2)
            End of stream token id.
        ngram (`int`, *optional*, defaults to 2)
            Number of future tokens to predict. Set to 1 to be same as traditional Language model to predict next first
            token.
        num_buckets (`int`, *optional*, defaults to 32)
            The number of buckets to use for each attention layer. This is for relative position calculation. See the
            [T5 paper](see https://arxiv.org/abs/1910.10683) for more details.
        relative_max_distance (`int`, *optional*, defaults to 128)
            Relative distances greater than this number will be put into the last same bucket. This is for relative
            position calculation. See the [T5 paper](see https://arxiv.org/abs/1910.10683) for more details.
        disable_ngram_loss (`bool`, *optional*, defaults to `False`):
            Whether be trained predicting only the next first token.
        eps (`float`, *optional*, defaults to 0.0):
            Controls the `epsilon` parameter value for label smoothing in the loss calculation. If set to 0, no label
            smoothing is performed.
        use_cache (`bool`, *optional*, defaults to `True`):
            Whether or not the model should return the last key/values attentions (not used by all models).
    Ú
prophetnetÚpast_key_valuesÚnum_attention_headsÚnum_encoder_attention_headsÚactivation_dropoutÚactivation_functionÚ
vocab_sizeÚhidden_sizeÚencoder_ffn_dimÚnum_encoder_layersÚdecoder_ffn_dimÚnum_decoder_layersÚnum_decoder_attention_headsÚattention_dropoutÚdropoutÚmax_position_embeddingsÚinit_stdÚis_encoder_decoderÚadd_cross_attentionÚdecoder_start_token_idÚngramÚnum_bucketsÚrelative_max_distanceÚdisable_ngram_lossÚepsÚ	use_cacheÚpad_token_idÚbos_token_idÚeos_token_idc           
      óJ  •— || _         || _        || _        || _        || _        || _        |	| _        |
| _        || _        || _	        || _
        || _        || _        || _        || _        || _        || _        || _        || _        || _        t)        ‰| �T  d||||||dœ|¤Ž y )N)r%   r&   r'   r   r   r   © )r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r   r   r   r$   ÚsuperÚ__init__)Úselfr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   ÚkwargsÚ	__class__s                               €úu/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/prophetnet/configuration_prophetnet.pyr+   zProphetNetConfig.__init__f   sÑ   ø€ ð< %ˆŒØ&ˆÔØ.ˆÔØ"4ˆÔØ+FˆÔ(Ø.ˆÔØ"4ˆÔØ+FˆÔ(Ø'>ˆÔ$Ø ˆŒØ#6ˆÔ ð ˆŒ
Ø&ˆÔØ%:ˆÔ"Ø"4ˆÔØˆŒð "3ˆÔØ"4ˆÔØˆŒà"ˆŒä‰Ñð 	
Ø%Ø%Ø%Ø1Ø 3Ø#9ñ	
ð ó	
ó    Úreturnc                 ó4   — | j                   | j                  z   S )N)r   r   )r,   s    r/   Únum_hidden_layersz"ProphetNetConfig.num_hidden_layers¨   s   € à×&Ñ&¨×)@Ñ)@Ñ@Ð@r0   c                 ó   — t        d«      ‚)NzyThis model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and `num_decoder_layers`.)ÚNotImplementedError)r,   Úvalues     r/   r3   z"ProphetNetConfig.num_hidden_layers¬   s   € ä!ð%ó
ð 	
r0   )çš™™™™™¹?Úgelui:w  i   é   é   é   r9   r:   r;   r7   r7   i   g{®Gáz”?TTr   é   é    é€   Fg        Tr   é   r<   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚattribute_mapr   Úfloatr   Ústrr   ÚintÚboolr+   Úpropertyr3   ÚsetterÚ__classcell__)r.   s   @r/   r
   r
      sD  ø„ ñCðJ €JØ#4Ð"5ÐàÐ<ð€Mð /2Ø>DØ$)Ø%)Ø)-Ø,.Ø57Ø)-Ø,.Ø57Ø-0Ø#&Ø14Ø$(Ø-1Ø.2Ø01Ø Ø%'Ø/2Ø-2Ø"Ø$(Ø&'Ø&'Ø&'ñ7@
à$ U™Oð@
ð & e¨C°¨MÑ&:Ñ;ð@
ð ˜S‘Mð	@
ð
 ˜c‘]ð@
ð " #™ð@
ð % S™Mð@
ð &.¨c¡]ð@
ð " #™ð@
ð % S™Mð@
ð &.¨c¡]ð@
ð $ E™?ð@
ð ˜%‘ð@
ð "*¨#¡ð@
ð ˜5‘/ð@
ð  % T™Nð!@
ð" & d™^ð#@
ð$ !)¨¡ð%@
ð& ˜‰}ð'@
ð( ˜c‘]ð)@
ð*  (¨™}ð+@
ð, % T™Nð-@
ð. �e‰_ð/@
ð0 ˜D‘>ð1@
ð2 ˜s‘mð3@
ð4 ˜s‘mð5@
ð6 ˜s‘mõ7@
ðD ðA 3ò Aó ðAð ×Ññ
ó ô
r0   r
   N)rC   Útypingr   r   r   Úconfiguration_utilsr   Úutilsr   Ú
get_loggerr@   Úloggerr
   Ú__all__r)   r0   r/   ú<module>rT      sD   ðñ %ç ,Ñ ,å 3Ý ð 
ˆ×	Ñ	˜HÓ	%€ôW
Ð'ô W
ðt Ð
�r0   