


"""simple docstring"""



from ... import PretrainedConfig


UpperCAmelCase   		=      {
    '''sijunhe/nezha-cn-base''': '''https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json''',
}
class        __magic_name__		(      a_  ):
       __A      :   List[str]   	= NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
       __A      :   int   	= "nezha"






       def __init__( self	:     Optional[int]	,  snake_case__	:     str=2_1_1_2_8	,  snake_case__	:     Optional[int]=7_6_8	,  snake_case__	:     List[Any]=1_2	,  snake_case__	:     Optional[Any]=1_2	,  snake_case__	:     Any=3_0_7_2	,  snake_case__	:     List[str]="gelu"	,  snake_case__	:     Optional[Any]=0.1	,  snake_case__	:     Tuple=0.1	,  snake_case__	:     Optional[Any]=5_1_2	,  snake_case__	:     Optional[int]=6_4	,  snake_case__	:     Optional[int]=2	,  snake_case__	:     int=0.02	,  snake_case__	:     Optional[int]=1e-1_2	,  snake_case__	:     str=0.1	,  snake_case__	:     List[Any]=0	,  snake_case__	:     Dict=2	,  snake_case__	:     Union[str, Any]=3	,  snake_case__	:     int=True	,  **snake_case__	:     List[Any]	,  ):

              '''simple docstring'''






              super().__init__(pad_token_id=__UpperCamelCase	,  bos_token_id=__UpperCamelCase	,  eos_token_id=__UpperCamelCase	,  **__UpperCamelCase					)

              lowercase		:Any											=					vocab_size
              lowercase		:Optional[Any]											=					hidden_size
              lowercase		:Tuple											=					num_hidden_layers
              lowercase		:str											=					num_attention_heads
              lowercase		:Union[str, Any]											=					hidden_act
              lowercase		:Optional[int]											=					intermediate_size
              lowercase		:Union[str, Any]											=					hidden_dropout_prob
              lowercase		:List[str]											=					attention_probs_dropout_prob
              lowercase		:List[str]											=					max_position_embeddings
              lowercase		:Any											=					max_relative_position
              lowercase		:List[Any]											=					type_vocab_size
              lowercase		:str											=					initializer_range
              lowercase		:Union[str, Any]											=					layer_norm_eps
              lowercase		:Optional[Any]											=					classifier_dropout
              lowercase		:int											=					use_cache









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


lowerCamelCase      :       Optional[int]    =						logging.get_logger(__name__)

lowerCamelCase      :       Optional[Any]    =						{
    '''google/pegasus-large''': '''https://huggingface.co/google/pegasus-large/resolve/main/config.json''',
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}



class 				_UpperCamelCase      (a_      ):
      snake_case_	=				"""pegasus"""
      snake_case_	=				["""past_key_values"""]
      snake_case_	=				{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}


      def __init__(						self       ,    __UpperCamelCase=5_0_2_6_5       ,    __UpperCamelCase=1_0_2_4       ,    __UpperCamelCase=1_2       ,    __UpperCamelCase=4_0_9_6       ,    __UpperCamelCase=1_6       ,    __UpperCamelCase=1_2       ,    __UpperCamelCase=4_0_9_6       ,    __UpperCamelCase=1_6       ,    __UpperCamelCase=0.0       ,    __UpperCamelCase=0.0       ,    __UpperCamelCase=True       ,    __UpperCamelCase=True       ,    __UpperCamelCase="gelu"       ,    __UpperCamelCase=1_0_2_4       ,    __UpperCamelCase=0.1       ,    __UpperCamelCase=0.0       ,    __UpperCamelCase=0.0       ,    __UpperCamelCase=0.0_2       ,    __UpperCamelCase=0       ,    __UpperCamelCase=False       ,    __UpperCamelCase=0       ,    __UpperCamelCase=1       ,    __UpperCamelCase=1       ,    **__UpperCamelCase       ,    )->						Tuple:
           __lowerCAmelCase             =       vocab_size
           __lowerCAmelCase             =       max_position_embeddings
           __lowerCAmelCase             =       d_model
           __lowerCAmelCase             =       encoder_ffn_dim
           __lowerCAmelCase             =       encoder_layers
           __lowerCAmelCase             =       encoder_attention_heads
           __lowerCAmelCase             =       decoder_ffn_dim
           __lowerCAmelCase             =       decoder_layers
           __lowerCAmelCase             =       decoder_attention_heads
           __lowerCAmelCase             =       dropout
           __lowerCAmelCase             =       attention_dropout
           __lowerCAmelCase             =       activation_dropout
           __lowerCAmelCase             =       activation_function
           __lowerCAmelCase             =       init_std
           __lowerCAmelCase             =       encoder_layerdrop
           __lowerCAmelCase             =       decoder_layerdrop
           __lowerCAmelCase             =       use_cache
           __lowerCAmelCase             =       encoder_layers
           __lowerCAmelCase             =       scale_embedding  # scale factor will be sqrt(d_model) if True
           super().__init__(
               pad_token_id=__UpperCamelCase       ,    eos_token_id=__UpperCamelCase       ,    is_encoder_decoder=__UpperCamelCase       ,    decoder_start_token_id=__UpperCamelCase       ,    forced_eos_token_id=__UpperCamelCase       ,    **__UpperCamelCase       ,    )


      @property
      def 			__UpperCAmelCase		(						self						)->						int:
           return self.encoder_attention_heads


      @property
      def 			__UpperCAmelCase		(						self						)->						int:
           return self.d_model






