





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


_SCREAMING_SNAKE_CASE					=    logging.get_logger(__name__)

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






class 							__lowercase       (      __a						):







	'''simple docstring'''

	a    :				int											=       '''roc_bert'''


	def __init__(self     ,_lowerCamelCase=30522     ,_lowerCamelCase=768     ,_lowerCamelCase=12     ,_lowerCamelCase=12     ,_lowerCamelCase=3072     ,_lowerCamelCase="gelu"     ,_lowerCamelCase=0.1     ,_lowerCamelCase=0.1     ,_lowerCamelCase=512     ,_lowerCamelCase=2     ,_lowerCamelCase=0.0_2     ,_lowerCamelCase=1E-1_2     ,_lowerCamelCase=True     ,_lowerCamelCase=0     ,_lowerCamelCase="absolute"     ,_lowerCamelCase=None     ,_lowerCamelCase=True     ,_lowerCamelCase=True     ,_lowerCamelCase=768     ,_lowerCamelCase=910     ,_lowerCamelCase=512     ,_lowerCamelCase=24858     ,_lowerCamelCase=True     ,**_lowerCamelCase     ,)							->							Union[str, Any]:







				'''simple docstring'''





				__lowercase										=							vocab_size
				__lowercase										=							max_position_embeddings
				__lowercase										=							hidden_size
				__lowercase										=							num_hidden_layers
				__lowercase										=							num_attention_heads
				__lowercase										=							intermediate_size
				__lowercase										=							hidden_act
				__lowercase										=							hidden_dropout_prob
				__lowercase										=							attention_probs_dropout_prob
				__lowercase										=							initializer_range
				__lowercase										=							type_vocab_size
				__lowercase										=							layer_norm_eps
				__lowercase										=							use_cache
				__lowercase										=							enable_pronunciation
				__lowercase										=							enable_shape
				__lowercase										=							pronunciation_embed_dim
				__lowercase										=							pronunciation_vocab_size
				__lowercase										=							shape_embed_dim
				__lowercase										=							shape_vocab_size
				__lowercase										=							concat_input
				__lowercase										=							position_embedding_type
				__lowercase										=							classifier_dropout
				super().__init__(pad_token_id=snake_case__     ,**snake_case__ )












'''simple docstring'''



import math




def    _lowerCAmelCase						(				lowerCamelCase_			:  int				):
			assert isinstance(lowerCamelCase_		,       lowerCamelCase_				) and (
			    number >= 0
			), "'number' must been an int and positive"

			if 1 < number < 4:
						# 2 and 3 are primes
						return True
			elif number < 2 or not number % 2:
						# Negatives, 0, 1 and all even numbers are not primes
						return False

			__lowercase										=							range(3		,       int(math.sqrt(lowerCamelCase_				) + 1				)		,       2				)
			return not any(not number % i for i in odd_numbers				)




def    _lowerCAmelCase						(				lowerCamelCase_			:  Dict		,       lowerCamelCase_			:  Any=1		,       **lowerCamelCase_			:  Tuple				):
			__lowercase										=							factor * value
			__lowercase										=							value

			while not is_prime(lowerCamelCase_				):
						value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

			if value == first_value_val:
						return next_prime(value + 1		,       **lowerCamelCase_				)
			return value





