





'''simple docstring'''

from typing import Callable, Optional, Union

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


lowerCAmelCase__      :   Tuple      	=			logging.get_logger(__name__)

lowerCAmelCase__      :   Union[str, Any]      	=			{
    """microsoft/prophetnet-large-uncased""": (
        """https://huggingface.co/microsoft/prophetnet-large-uncased/resolve/main/config.json"""
    ),
}


class      SCREAMING_SNAKE_CASE__      (   snake_case__		):







					"""simple docstring"""






					SCREAMING_SNAKE_CASE							=	'''prophetnet'''
					SCREAMING_SNAKE_CASE							=	['''past_key_values''']
					SCREAMING_SNAKE_CASE							=	{
					    '''num_attention_heads''': '''num_encoder_attention_heads''',
					}
					def __init__(   self       :      Optional[int]		,	UpperCAmelCase_       :      Optional[float] = 0.1		,	UpperCAmelCase_       :      Optional[Union[str, Callable]] = "gelu"		,	UpperCAmelCase_       :      Optional[int] = 30_522		,	UpperCAmelCase_       :      Optional[int] = 1_024		,	UpperCAmelCase_       :      Optional[int] = 4_096		,	UpperCAmelCase_       :      Optional[int] = 12		,	UpperCAmelCase_       :      Optional[int] = 16		,	UpperCAmelCase_       :      Optional[int] = 4_096		,	UpperCAmelCase_       :      Optional[int] = 12		,	UpperCAmelCase_       :      Optional[int] = 16		,	UpperCAmelCase_       :      Optional[float] = 0.1		,	UpperCAmelCase_       :      Optional[float] = 0.1		,	UpperCAmelCase_       :      Optional[int] = 512		,	UpperCAmelCase_       :      Optional[float] = 0.02		,	UpperCAmelCase_       :      Optional[bool] = True		,	UpperCAmelCase_       :      Optional[bool] = True		,	UpperCAmelCase_       :      Optional[int] = 0		,	UpperCAmelCase_       :      Optional[int] = 2		,	UpperCAmelCase_       :      Optional[int] = 32		,	UpperCAmelCase_       :      Optional[int] = 128		,	UpperCAmelCase_       :      Optional[bool] = False		,	UpperCAmelCase_       :      Optional[float] = 0.0		,	UpperCAmelCase_       :      Optional[bool] = True		,	UpperCAmelCase_       :      Optional[int] = 0		,	UpperCAmelCase_       :      Optional[int] = 1		,	UpperCAmelCase_       :      Optional[int] = 2		,	**UpperCAmelCase_       :      Dict		,	):







							"""simple docstring"""
							__UpperCAmelCase	:							Dict     =     vocab_size
							__UpperCAmelCase	:							Any     =     hidden_size
							__UpperCAmelCase	:							Tuple     =     encoder_ffn_dim
							__UpperCAmelCase	:							List[str]     =     num_encoder_layers
							__UpperCAmelCase	:							Tuple     =     num_encoder_attention_heads
							__UpperCAmelCase	:							Union[str, Any]     =     decoder_ffn_dim
							__UpperCAmelCase	:							List[str]     =     num_decoder_layers
							__UpperCAmelCase	:							Dict     =     num_decoder_attention_heads
							__UpperCAmelCase	:							int     =     max_position_embeddings
							__UpperCAmelCase	:							List[Any]     =     init_std  # Normal(0, this parameter)
							__UpperCAmelCase	:							Tuple     =     activation_function

							# parameters for prophetnet
							__UpperCAmelCase	:							str     =     ngram
							__UpperCAmelCase	:							List[str]     =     num_buckets
							__UpperCAmelCase	:							Tuple     =     relative_max_distance
							__UpperCAmelCase	:							str     =     disable_ngram_loss
							__UpperCAmelCase	:							Dict     =     eps

							# 3 Types of Dropout
							__UpperCAmelCase	:							Dict     =     attention_dropout
							__UpperCAmelCase	:							Tuple     =     activation_dropout
							__UpperCAmelCase	:							List[str]     =     dropout

							__UpperCAmelCase	:							List[Any]     =     use_cache

							super().__init__(
							    pad_token_id=UpperCAmelCase_		,	bos_token_id=UpperCAmelCase_		,	eos_token_id=UpperCAmelCase_		,	is_encoder_decoder=UpperCAmelCase_		,	add_cross_attention=UpperCAmelCase_		,	decoder_start_token_id=UpperCAmelCase_		,	**UpperCAmelCase_		,	)
					@property
					def 		lowerCamelCase_   (   self       :      Tuple		):







							"""simple docstring"""
							return self.num_encoder_layers + self.num_decoder_layers






					@num_hidden_layers.setter
					def 		lowerCamelCase_   (   self       :      Any		,	UpperCAmelCase_       :      Tuple		):







							"""simple docstring"""
							raise NotImplementedError(
							    "This model does not support the setting of `num_hidden_layers`. Please set `num_encoder_layers` and"
							    " `num_decoder_layers`."		)










def        lowerCamelCase_     (     SCREAMING_SNAKE_CASE       ,						SCREAMING_SNAKE_CASE ):
			'''simple docstring'''
			if n == 0:
						return 1

			elif n % 2 == 1:
						return binary_exponentiation(SCREAMING_SNAKE_CASE       ,						n - 1 ) * a

			else:
						SCREAMING_SNAKE_CASE     =       binary_exponentiation(SCREAMING_SNAKE_CASE       ,						n / 2 )
						return b * b


if __name__ == "__main__":
		try:
				__A    :				Tuple    						=	int(input("""Enter Base : """).strip())
				__A    :				Any    						=	int(input("""Enter Power : """).strip())
		except ValueError:
				print("""Invalid literal for integer""")

		__A    :				Union[str, Any]    						=	binary_exponentiation(BASE, POWER)
		print(f'''{BASE}^({POWER}) : {RESULT}''')






