





def 		__SCREAMING_SNAKE_CASE						(       UpperCamelCase__    ,    UpperCamelCase__				)						->       Union[str, Any]:







			'''simple docstring'''

			UpperCAmelCase     	=       1
			while b > 0:
						if b & 1:
									res *= a

						a *= a
						b >>= 1

			return res





def 		__SCREAMING_SNAKE_CASE						(       UpperCamelCase__    ,    UpperCamelCase__    ,    UpperCamelCase__				)						->       Dict:







			'''simple docstring'''

			UpperCAmelCase     	=       1
			while b > 0:
						if b & 1:
									UpperCAmelCase     	=       ((res % c) * (a % c)) % c

						a *= a
						b >>= 1

			return res










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


__A       :					Any     					=     logging.get_logger(__name__)

__A       :					Tuple     					=     {
    "google/pegasus-x-base": "https://huggingface.co/google/pegasus-x-base/resolve/main/config.json",
    "google/pegasus-x-large": "https://huggingface.co/google/pegasus-x-large/resolve/main/config.json",
    # See all PEGASUS-X models at https://huggingface.co/models?filter=pegasus-x
}

class 			A_ (a_    ):
	UpperCAmelCase__      =    '''pegasus_x'''
	UpperCAmelCase__      =    ['''past_key_values''']
	UpperCAmelCase__      =    {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}
	def __init__(					self							,      _A=9_6_1_0_3							,      _A=1_6_3_8_4							,      _A=1_6							,      _A=4_0_9_6							,      _A=1_6							,      _A=1_6							,      _A=4_0_9_6							,      _A=1_6							,      _A=0.0							,      _A=0.0							,      _A=True							,      _A=True							,      _A="gelu"							,      _A=1_0_2_4							,      _A=0.1							,      _A=0.0							,      _A=0.0							,      _A=0.02							,      _A=0							,      _A=True							,      _A=0							,      _A=1							,      _A=1							,      _A=3_2							,      _A=5_1_2							,      _A=True							,      **_A							,      ):






				'''simple docstring'''







				UpperCAmelCase     	=       vocab_size
				UpperCAmelCase     	=       max_position_embeddings
				UpperCAmelCase     	=       d_model
				UpperCAmelCase     	=       encoder_ffn_dim
				UpperCAmelCase     	=       encoder_layers
				UpperCAmelCase     	=       encoder_attention_heads
				UpperCAmelCase     	=       decoder_ffn_dim
				UpperCAmelCase     	=       decoder_layers
				UpperCAmelCase     	=       decoder_attention_heads
				UpperCAmelCase     	=       dropout
				UpperCAmelCase     	=       attention_dropout
				UpperCAmelCase     	=       activation_dropout
				UpperCAmelCase     	=       activation_function
				UpperCAmelCase     	=       init_std
				UpperCAmelCase     	=       encoder_layerdrop
				UpperCAmelCase     	=       decoder_layerdrop
				UpperCAmelCase     	=       use_cache
				UpperCAmelCase     	=       encoder_layers
				UpperCAmelCase     	=       scale_embedding  # scale factor will be sqrt(d_model) if True

				UpperCAmelCase     	=       num_global_tokens
				UpperCAmelCase     	=       block_size
				UpperCAmelCase     	=       stagger_local_blocks

				super().__init__(
				    pad_token_id=_A							,      eos_token_id=_A							,      is_encoder_decoder=_A							,      decoder_start_token_id=_A							,      forced_eos_token_id=_A							,      **_A							,      )
	@property
	def   _lowercase       (					self	):






				'''simple docstring'''







				return self.encoder_attention_heads







	@property
	def   _lowercase       (					self	):






				'''simple docstring'''







				return self.d_model



