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


_lowerCamelCase       :				Union[str, Any]       =			logging.get_logger(__name__)

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




class    SCREAMING_SNAKE_CASE__     (	UpperCAmelCase					):





	'''simple docstring'''



	_UpperCAmelCase       :		Any       =					"roc_bert"



	def __init__(  self	:    int			,  lowercase	:    Optional[Any]=30_522			,  lowercase	:    Tuple=768			,  lowercase	:    Optional[int]=12			,  lowercase	:    Union[str, Any]=12			,  lowercase	:    List[str]=3_072			,  lowercase	:    Dict="gelu"			,  lowercase	:    List[Any]=0.1			,  lowercase	:    List[str]=0.1			,  lowercase	:    Dict=512			,  lowercase	:    List[str]=2			,  lowercase	:    Optional[int]=0.02			,  lowercase	:    int=1E-12			,  lowercase	:    List[str]=True			,  lowercase	:    int=0			,  lowercase	:    str="absolute"			,  lowercase	:    Tuple=None			,  lowercase	:    str=True			,  lowercase	:    Union[str, Any]=True			,  lowercase	:    Dict=768			,  lowercase	:    Optional[Any]=910			,  lowercase	:    List[str]=512			,  lowercase	:    int=24_858			,  lowercase	:    List[str]=True			,  **lowercase	:    Dict			,  ):


				'''simple docstring'''


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

def        a_		(       __lowercase   :	str ) ->  int:
			_snake_case		=			hex_num.strip()
			if not hex_num:
						raise ValueError('No value was passed to the function' )

			_snake_case		=			hex_num[0] == '-'
			if is_negative:
						_snake_case		=			hex_num[1:]

			try:
						_snake_case		=			int(__lowercase       ,					16 )
			except ValueError:
						raise ValueError('Invalid value was passed to the function' )

			_snake_case		=			''
			while int_num > 0:
						_snake_case		=			str(int_num % 2 ) + bin_str
						int_num >>= 1

			return int(('-' + bin_str) if is_negative else bin_str )


if __name__ == "__main__":
			import doctest

			doctest.testmod()