



'''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"""




def     lowercase			(SCREAMING_SNAKE_CASE_		:				int  )   ->						str:
						SCREAMING_SNAKE_CASE													=					int(SCREAMING_SNAKE_CASE_  )
						if decimal in (0, 1):  # Exit cases for the recursion
												return str(SCREAMING_SNAKE_CASE_  )
						SCREAMING_SNAKE_CASE							,				SCREAMING_SNAKE_CASE													=					divmod(SCREAMING_SNAKE_CASE_ ,			2  )
						return binary_recursive(SCREAMING_SNAKE_CASE_  ) + str(SCREAMING_SNAKE_CASE_  )


def     lowercase			(SCREAMING_SNAKE_CASE_		:				str  )   ->						str:
						SCREAMING_SNAKE_CASE													=					str(SCREAMING_SNAKE_CASE_  ).strip()
						if not number:
												raise ValueError('No input value was provided'  )
						SCREAMING_SNAKE_CASE													=					'-' if number.startswith('-'  ) else ''
						SCREAMING_SNAKE_CASE													=					number.lstrip('-'  )
						if not number.isnumeric():
												raise ValueError('Input value is not an integer'  )
						return F'{negative}0b{binary_recursive(int(SCREAMING_SNAKE_CASE_  )  )}'


if __name__ == "__main__":
	from doctest import testmod

	testmod()


