





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


_UpperCAmelCase             =							logging.get_logger(__name__)

_UpperCAmelCase             =							{
    '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        snake_case_    (		__lowercase						):
  A_      							=   'pegasus'
  A_      							=   ['past_key_values']
  A_      							=   {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}






  def __init__(							self			:					Tuple       ,  _snake_case			:					int=50265       ,  _snake_case			:					str=1024       ,  _snake_case			:					Any=12       ,  _snake_case			:					Optional[int]=4096       ,  _snake_case			:					Tuple=16       ,  _snake_case			:					Any=12       ,  _snake_case			:					Optional[Any]=4096       ,  _snake_case			:					List[str]=16       ,  _snake_case			:					Tuple=0.0       ,  _snake_case			:					Union[str, Any]=0.0       ,  _snake_case			:					List[str]=True       ,  _snake_case			:					Union[str, Any]=True       ,  _snake_case			:					str="gelu"       ,  _snake_case			:					Tuple=1024       ,  _snake_case			:					int=0.1       ,  _snake_case			:					int=0.0       ,  _snake_case			:					List[str]=0.0       ,  _snake_case			:					int=0.02       ,  _snake_case			:					Optional[Any]=0       ,  _snake_case			:					Tuple=False       ,  _snake_case			:					Tuple=0       ,  _snake_case			:					Tuple=1       ,  _snake_case			:					Optional[int]=1       ,  **_snake_case			:					Any       ,  )->List[Any]:






   '''simple docstring'''

   __lowerCAmelCase					:	Dict      =       vocab_size
   __lowerCAmelCase					:	Union[str, Any]      =       max_position_embeddings
   __lowerCAmelCase					:	Tuple      =       d_model
   __lowerCAmelCase					:	Optional[int]      =       encoder_ffn_dim
   __lowerCAmelCase					:	List[str]      =       encoder_layers
   __lowerCAmelCase					:	List[str]      =       encoder_attention_heads
   __lowerCAmelCase					:	Optional[int]      =       decoder_ffn_dim
   __lowerCAmelCase					:	Union[str, Any]      =       decoder_layers
   __lowerCAmelCase					:	Optional[int]      =       decoder_attention_heads
   __lowerCAmelCase					:	Optional[Any]      =       dropout
   __lowerCAmelCase					:	List[Any]      =       attention_dropout
   __lowerCAmelCase					:	Optional[Any]      =       activation_dropout
   __lowerCAmelCase					:	str      =       activation_function
   __lowerCAmelCase					:	Optional[Any]      =       init_std
   __lowerCAmelCase					:	Optional[int]      =       encoder_layerdrop
   __lowerCAmelCase					:	Optional[Any]      =       decoder_layerdrop
   __lowerCAmelCase					:	Any      =       use_cache
   __lowerCAmelCase					:	List[str]      =       encoder_layers
   __lowerCAmelCase					:	Union[str, Any]      =       scale_embedding  # scale factor will be sqrt(d_model) if True
   super().__init__(
       pad_token_id=_snake_case       ,  eos_token_id=_snake_case       ,  is_encoder_decoder=_snake_case       ,  decoder_start_token_id=_snake_case       ,  forced_eos_token_id=_snake_case       ,  **_snake_case       ,  )






  @property
  def 				UpperCAmelCase__						(							self			:					List[Any]      )->int:






   '''simple docstring'''

   return self.encoder_attention_heads






  @property
  def 				UpperCAmelCase__						(							self			:					str      )->int:






   '''simple docstring'''

   return self.d_model






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


_UpperCAmelCase             =							logging.get_logger(__name__)

_UpperCAmelCase             =							{
    'microsoft/biogpt': 'https://huggingface.co/microsoft/biogpt/resolve/main/config.json',
    # See all BioGPT models at https://huggingface.co/models?filter=biogpt
}






class        snake_case_    (		__lowercase						):
  A_      							=   'biogpt'






  def __init__(							self			:					int       ,  _snake_case			:					Any=42384       ,  _snake_case			:					Any=1024       ,  _snake_case			:					List[Any]=24       ,  _snake_case			:					Any=16       ,  _snake_case			:					List[str]=4096       ,  _snake_case			:					Dict="gelu"       ,  _snake_case			:					Tuple=0.1       ,  _snake_case			:					str=0.1       ,  _snake_case			:					Tuple=1024       ,  _snake_case			:					Tuple=0.02       ,  _snake_case			:					Tuple=1E-12       ,  _snake_case			:					Optional[int]=True       ,  _snake_case			:					Optional[int]=True       ,  _snake_case			:					Any=0.0       ,  _snake_case			:					Tuple=0.0       ,  _snake_case			:					str=1       ,  _snake_case			:					Dict=0       ,  _snake_case			:					str=2       ,  **_snake_case			:					Union[str, Any]       ,  )->Dict:






   '''simple docstring'''

   __lowerCAmelCase					:	List[Any]      =       vocab_size
   __lowerCAmelCase					:	Dict      =       max_position_embeddings
   __lowerCAmelCase					:	str      =       hidden_size
   __lowerCAmelCase					:	Dict      =       num_hidden_layers
   __lowerCAmelCase					:	List[Any]      =       num_attention_heads
   __lowerCAmelCase					:	Optional[Any]      =       intermediate_size
   __lowerCAmelCase					:	int      =       hidden_act
   __lowerCAmelCase					:	Any      =       hidden_dropout_prob
   __lowerCAmelCase					:	Any      =       attention_probs_dropout_prob
   __lowerCAmelCase					:	Any      =       initializer_range
   __lowerCAmelCase					:	int      =       layer_norm_eps
   __lowerCAmelCase					:	Optional[int]      =       scale_embedding
   __lowerCAmelCase					:	List[Any]      =       use_cache
   __lowerCAmelCase					:	str      =       layerdrop
   __lowerCAmelCase					:	Dict      =       activation_dropout
   super().__init__(pad_token_id=_snake_case       ,  bos_token_id=_snake_case       ,  eos_token_id=_snake_case       ,  **_snake_case      )