






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


__UpperCAmelCase     							=						logging.get_logger(__name__)

__UpperCAmelCase     							=						{
    'weiweishi/roc-bert-base-zh': 'https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json',
}



class 						lowerCamelCase				(__SCREAMING_SNAKE_CASE      ):







		'''simple docstring'''



		_snake_case   :   str							=  '''roc_bert'''



		def __init__(							self    ,		_UpperCamelCase=3_0_5_2_2    ,		_UpperCamelCase=7_6_8    ,		_UpperCamelCase=1_2    ,		_UpperCamelCase=1_2    ,		_UpperCamelCase=3_0_7_2    ,		_UpperCamelCase="gelu"    ,		_UpperCamelCase=0.1    ,		_UpperCamelCase=0.1    ,		_UpperCamelCase=5_1_2    ,		_UpperCamelCase=2    ,		_UpperCamelCase=0.02    ,		_UpperCamelCase=1E-12    ,		_UpperCamelCase=True    ,		_UpperCamelCase=0    ,		_UpperCamelCase="absolute"    ,		_UpperCamelCase=None    ,		_UpperCamelCase=True    ,		_UpperCamelCase=True    ,		_UpperCamelCase=7_6_8    ,		_UpperCamelCase=9_1_0    ,		_UpperCamelCase=5_1_2    ,		_UpperCamelCase=2_4_8_5_8    ,		_UpperCamelCase=True    ,		**_UpperCamelCase    ,		)     ->							List[str]:
							UpperCAmelCase_   :				int						=						vocab_size
							UpperCAmelCase_   :				str						=						max_position_embeddings
							UpperCAmelCase_   :				str						=						hidden_size
							UpperCAmelCase_   :				List[str]						=						num_hidden_layers
							UpperCAmelCase_   :				List[Any]						=						num_attention_heads
							UpperCAmelCase_   :				str						=						intermediate_size
							UpperCAmelCase_   :				Dict						=						hidden_act
							UpperCAmelCase_   :				Any						=						hidden_dropout_prob
							UpperCAmelCase_   :				str						=						attention_probs_dropout_prob
							UpperCAmelCase_   :				Dict						=						initializer_range
							UpperCAmelCase_   :				List[Any]						=						type_vocab_size
							UpperCAmelCase_   :				List[str]						=						layer_norm_eps
							UpperCAmelCase_   :				Optional[Any]						=						use_cache
							UpperCAmelCase_   :				str						=						enable_pronunciation
							UpperCAmelCase_   :				Dict						=						enable_shape
							UpperCAmelCase_   :				List[str]						=						pronunciation_embed_dim
							UpperCAmelCase_   :				List[Any]						=						pronunciation_vocab_size
							UpperCAmelCase_   :				List[Any]						=						shape_embed_dim
							UpperCAmelCase_   :				Tuple						=						shape_vocab_size
							UpperCAmelCase_   :				Optional[int]						=						concat_input
							UpperCAmelCase_   :				Optional[Any]						=						position_embedding_type
							UpperCAmelCase_   :				Optional[Any]						=						classifier_dropout
							super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE    ,		**_SCREAMING_SNAKE_CASE       )














def 					lowercase__				(					__snake_case   :							str					,	__snake_case   :							int					,	__snake_case   :							List[str]  ):


					'''simple docstring'''


					if n == 0:
										return 1

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

					else:
										UpperCAmelCase_   :				Optional[int]						=						binary_exponentiation(__snake_case					,	n / 2					,	__snake_case  )
										return (b * b) % mod


# a prime number
__UpperCAmelCase     							=						701

__UpperCAmelCase     							=						1000000000
__UpperCAmelCase     							=						10

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)






print((a / b) % p == (a * b ** (p - 2)) % p)






