



"""simple docstring"""

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


A_	:						Optional[Any]				=			logging.get_logger(__name__)

A_	:						List[Any]				=			{
    '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 						lowerCAmelCase__	(  _lowerCamelCase   ):


	'''simple docstring'''







	_SCREAMING_SNAKE_CASE  :		Union[str, Any]     	=   '''pegasus_x'''
	_SCREAMING_SNAKE_CASE  :		Optional[Any]     	=   ['''past_key_values''']
	_SCREAMING_SNAKE_CASE  :		Dict     	=   {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}





	def __init__(			self							:					List[str]    ,					_SCREAMING_SNAKE_CASE							:					Optional[Any]=96_103    ,					_SCREAMING_SNAKE_CASE							:					str=16_384    ,					_SCREAMING_SNAKE_CASE							:					Union[str, Any]=16    ,					_SCREAMING_SNAKE_CASE							:					List[str]=4_096    ,					_SCREAMING_SNAKE_CASE							:					Union[str, Any]=16    ,					_SCREAMING_SNAKE_CASE							:					Optional[int]=16    ,					_SCREAMING_SNAKE_CASE							:					int=4_096    ,					_SCREAMING_SNAKE_CASE							:					int=16    ,					_SCREAMING_SNAKE_CASE							:					Dict=0.0    ,					_SCREAMING_SNAKE_CASE							:					str=0.0    ,					_SCREAMING_SNAKE_CASE							:					str=True    ,					_SCREAMING_SNAKE_CASE							:					Tuple=True    ,					_SCREAMING_SNAKE_CASE							:					str="gelu"    ,					_SCREAMING_SNAKE_CASE							:					List[Any]=1_024    ,					_SCREAMING_SNAKE_CASE							:					str=0.1    ,					_SCREAMING_SNAKE_CASE							:					Dict=0.0    ,					_SCREAMING_SNAKE_CASE							:					Optional[int]=0.0    ,					_SCREAMING_SNAKE_CASE							:					int=0.0_2    ,					_SCREAMING_SNAKE_CASE							:					List[str]=0    ,					_SCREAMING_SNAKE_CASE							:					str=True    ,					_SCREAMING_SNAKE_CASE							:					List[Any]=0    ,					_SCREAMING_SNAKE_CASE							:					Tuple=1    ,					_SCREAMING_SNAKE_CASE							:					List[str]=1    ,					_SCREAMING_SNAKE_CASE							:					str=32    ,					_SCREAMING_SNAKE_CASE							:					Optional[int]=512    ,					_SCREAMING_SNAKE_CASE							:					Tuple=True    ,					**_SCREAMING_SNAKE_CASE							:					List[str]    ,					)	->  str:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       List[Any] 							=    vocab_size
					SCREAMING_SNAKE_CASE	:       Optional[Any] 							=    max_position_embeddings
					SCREAMING_SNAKE_CASE	:       Union[str, Any] 							=    d_model
					SCREAMING_SNAKE_CASE	:       Dict 							=    encoder_ffn_dim
					SCREAMING_SNAKE_CASE	:       str 							=    encoder_layers
					SCREAMING_SNAKE_CASE	:       List[Any] 							=    encoder_attention_heads
					SCREAMING_SNAKE_CASE	:       Tuple 							=    decoder_ffn_dim
					SCREAMING_SNAKE_CASE	:       int 							=    decoder_layers
					SCREAMING_SNAKE_CASE	:       Tuple 							=    decoder_attention_heads
					SCREAMING_SNAKE_CASE	:       int 							=    dropout
					SCREAMING_SNAKE_CASE	:       Union[str, Any] 							=    attention_dropout
					SCREAMING_SNAKE_CASE	:       str 							=    activation_dropout
					SCREAMING_SNAKE_CASE	:       List[Any] 							=    activation_function
					SCREAMING_SNAKE_CASE	:       str 							=    init_std
					SCREAMING_SNAKE_CASE	:       int 							=    encoder_layerdrop
					SCREAMING_SNAKE_CASE	:       Tuple 							=    decoder_layerdrop
					SCREAMING_SNAKE_CASE	:       List[str] 							=    use_cache
					SCREAMING_SNAKE_CASE	:       str 							=    encoder_layers
					SCREAMING_SNAKE_CASE	:       Any 							=    scale_embedding  # scale factor will be sqrt(d_model) if True

					SCREAMING_SNAKE_CASE	:       Tuple 							=    num_global_tokens
					SCREAMING_SNAKE_CASE	:       Tuple 							=    block_size
					SCREAMING_SNAKE_CASE	:       Union[str, Any] 							=    stagger_local_blocks

					super().__init__(
					    pad_token_id=_SCREAMING_SNAKE_CASE    ,					eos_token_id=_SCREAMING_SNAKE_CASE    ,					is_encoder_decoder=_SCREAMING_SNAKE_CASE    ,					decoder_start_token_id=_SCREAMING_SNAKE_CASE    ,					forced_eos_token_id=_SCREAMING_SNAKE_CASE    ,					**_SCREAMING_SNAKE_CASE    ,					)





	@property
	def  _lowerCAmelCase    (			self							:					Optional[Any]						)	->  int:





					"""simple docstring"""


					return self.encoder_attention_heads







	@property
	def  _lowerCAmelCase    (			self							:					Tuple						)	->  int:





					"""simple docstring"""


					return self.d_model










"""simple docstring"""

def    __snake_case       (  __A			:	int    )    ->					int:






				'''simple docstring'''
				if not isinstance(__A       ,		__A    ):
								raise ValueError('double_factorial() only accepts integral values'    )
				if num < 0:
								raise ValueError('double_factorial() not defined for negative values'    )
				SCREAMING_SNAKE_CASE	:       List[str] 							=    1
				for i in range(__A       ,		0       ,		-2    ):
								value *= i
				return value


if __name__ == "__main__":
							import doctest

							doctest.testmod()





