





"""simple docstring"""


from typing import Callable, Optional, Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


__magic_name__					:				List[Any]	= logging.get_logger(__name__)

__magic_name__					:				Union[str, Any]	= {
    """microsoft/prophetnet-large-uncased""": (
        """https://huggingface.co/microsoft/prophetnet-large-uncased/resolve/main/config.json"""
    ),
}






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

   """simple docstring"""
   __lowerCAmelCase    :							Any								=     """prophetnet"""
   __lowerCAmelCase    :							Optional[int]								=     ["""past_key_values"""]
   __lowerCAmelCase    :							str								=     {
       """num_attention_heads""": """num_encoder_attention_heads""",
   }







   def __init__(			self	,      _A = 0.1	,      _A = "gelu"	,      _A = 3_0_5_2_2	,      _A = 1_0_2_4	,      _A = 4_0_9_6	,      _A = 1_2	,      _A = 1_6	,      _A = 4_0_9_6	,      _A = 1_2	,      _A = 1_6	,      _A = 0.1	,      _A = 0.1	,      _A = 5_1_2	,      _A = 0.02	,      _A = True	,      _A = True	,      _A = 0	,      _A = 2	,      _A = 3_2	,      _A = 1_2_8	,      _A = False	,      _A = 0.0	,      _A = True	,      _A = 0	,      _A = 1	,      _A = 2	,      **_A	,      ):






         '''simple docstring'''







         UpperCamelCase							:		Optional[int]							      = vocab_size
         UpperCamelCase							:		int							      = hidden_size
         UpperCamelCase							:		List[Any]							      = encoder_ffn_dim
         UpperCamelCase							:		List[str]							      = num_encoder_layers
         UpperCamelCase							:		Optional[Any]							      = num_encoder_attention_heads
         UpperCamelCase							:		Tuple							      = decoder_ffn_dim
         UpperCamelCase							:		List[str]							      = num_decoder_layers
         UpperCamelCase							:		Any							      = num_decoder_attention_heads
         UpperCamelCase							:		List[Any]							      = max_position_embeddings
         UpperCamelCase							:		Union[str, Any]							      = init_std  # Normal(0, this parameter)
         UpperCamelCase							:		Union[str, Any]							      = activation_function

         # parameters for prophetnet
         UpperCamelCase							:		Optional[int]							      = ngram
         UpperCamelCase							:		Dict							      = num_buckets
         UpperCamelCase							:		Any							      = relative_max_distance
         UpperCamelCase							:		List[Any]							      = disable_ngram_loss
         UpperCamelCase							:		List[str]							      = eps

         # 3 Types of Dropout
         UpperCamelCase							:		List[Any]							      = attention_dropout
         UpperCamelCase							:		List[Any]							      = activation_dropout
         UpperCamelCase							:		Union[str, Any]							      = dropout

         UpperCamelCase							:		List[Any]							      = use_cache

         super().__init__(
             pad_token_id=_A	,      bos_token_id=_A	,      eos_token_id=_A	,      is_encoder_decoder=_A	,      add_cross_attention=_A	,      decoder_start_token_id=_A	,      **_A	,      )







   @property
   def      _a			(			self						):






         '''simple docstring'''







         return self.num_encoder_layers + self.num_decoder_layers







   @num_hidden_layers.setter
   def      _a			(			self	,      _A						):






         '''simple docstring'''







         raise NotImplementedError(
             """This model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and"""
             """ `num_decoder_layers`."""						)










"""simple docstring"""


from transformers import PretrainedConfig






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

			"""simple docstring"""
			__lowerCAmelCase    :							Optional[int]								=     """custom"""







			def __init__(			self	,      _A=1	,      **_A						):






									'''simple docstring'''







									UpperCamelCase							:		str							      = attribute
									super().__init__(**_A						)






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

			"""simple docstring"""
			__lowerCAmelCase    :							Any								=     """custom"""







			def __init__(			self	,      _A=1	,      **_A						):






									'''simple docstring'''







									UpperCamelCase							:		Any							      = attribute



