



'''simple docstring'''





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


_lowerCAmelCase      						=	logging.get_logger(__name__)

_lowerCAmelCase      						=	{
    '''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        lowerCAmelCase_(				SCREAMING_SNAKE_CASE_     ):
  '''simple docstring'''




  __lowercase							:      int				=      '''pegasus'''
  __lowercase							:      Optional[int]				=      ['''past_key_values''']
  __lowercase							:      Union[str, Any]				=      {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}




  def __init__(    self  ,__UpperCAmelCase=5_0265  ,__UpperCAmelCase=1024  ,__UpperCAmelCase=12  ,__UpperCAmelCase=4096  ,__UpperCAmelCase=16  ,__UpperCAmelCase=12  ,__UpperCAmelCase=4096  ,__UpperCAmelCase=16  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=True  ,__UpperCAmelCase=True  ,__UpperCAmelCase="gelu"  ,__UpperCAmelCase=1024  ,__UpperCAmelCase=0.1  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=0.0_2  ,__UpperCAmelCase=0  ,__UpperCAmelCase=False  ,__UpperCAmelCase=0  ,__UpperCAmelCase=1  ,__UpperCAmelCase=1  ,**__UpperCAmelCase  ,)    ->		int:
      lowerCAmelCase__ :  Any							      =					vocab_size
      lowerCAmelCase__ :  str							      =					max_position_embeddings
      lowerCAmelCase__ :  Union[str, Any]							      =					d_model
      lowerCAmelCase__ :  str							      =					encoder_ffn_dim
      lowerCAmelCase__ :  Union[str, Any]							      =					encoder_layers
      lowerCAmelCase__ :  Optional[Any]							      =					encoder_attention_heads
      lowerCAmelCase__ :  List[Any]							      =					decoder_ffn_dim
      lowerCAmelCase__ :  Tuple							      =					decoder_layers
      lowerCAmelCase__ :  int							      =					decoder_attention_heads
      lowerCAmelCase__ :  List[str]							      =					dropout
      lowerCAmelCase__ :  List[Any]							      =					attention_dropout
      lowerCAmelCase__ :  int							      =					activation_dropout
      lowerCAmelCase__ :  List[Any]							      =					activation_function
      lowerCAmelCase__ :  Tuple							      =					init_std
      lowerCAmelCase__ :  List[Any]							      =					encoder_layerdrop
      lowerCAmelCase__ :  List[str]							      =					decoder_layerdrop
      lowerCAmelCase__ :  Dict							      =					use_cache
      lowerCAmelCase__ :  Optional[int]							      =					encoder_layers
      lowerCAmelCase__ :  Any							      =					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






"""simple docstring"""




import warnings

from ..trainer import Trainer
from ..utils import logging


lowercase_			     =  logging.get_logger(__name__)
class 					__lowerCAmelCase					(   __SCREAMING_SNAKE_CASE       ):


		'''simple docstring'''



		def __init__(  self							, _a=None							, **_a      ):
				warnings.warn(
				    '''`SageMakerTrainer` is deprecated and will be removed in v5 of Transformers. You can use `Trainer` '''
				    '''instead.'''							, _a							, )
				super().__init__(args=_a							, **_a      )






