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


_snake_case      = logging.get_logger(__name__)

_snake_case      = {
    '''weiweishi/roc-bert-base-zh''': '''https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json''',
}
class       _lowerCAmelCase  (		__magic_name__							):

 """simple docstring"""
 SCREAMING_SNAKE_CASE_				:					Optional[Any]       						="roc_bert"

 def __init__(						self			:			List[str]					, SCREAMING_SNAKE_CASE__			:			Optional[int]=3_05_22					, SCREAMING_SNAKE_CASE__			:			List[str]=7_68					, SCREAMING_SNAKE_CASE__			:			Optional[Any]=12					, SCREAMING_SNAKE_CASE__			:			List[Any]=12					, SCREAMING_SNAKE_CASE__			:			Tuple=30_72					, SCREAMING_SNAKE_CASE__			:			Any="gelu"					, SCREAMING_SNAKE_CASE__			:			Optional[int]=0.1					, SCREAMING_SNAKE_CASE__			:			Optional[int]=0.1					, SCREAMING_SNAKE_CASE__			:			Optional[int]=5_12					, SCREAMING_SNAKE_CASE__			:			str=2					, SCREAMING_SNAKE_CASE__			:			Any=0.02					, SCREAMING_SNAKE_CASE__			:			Optional[Any]=1e-12					, SCREAMING_SNAKE_CASE__			:			Union[str, Any]=True					, SCREAMING_SNAKE_CASE__			:			Dict=0					, SCREAMING_SNAKE_CASE__			:			List[Any]="absolute"					, SCREAMING_SNAKE_CASE__			:			Optional[int]=None					, SCREAMING_SNAKE_CASE__			:			Dict=True					, SCREAMING_SNAKE_CASE__			:			Union[str, Any]=True					, SCREAMING_SNAKE_CASE__			:			str=7_68					, SCREAMING_SNAKE_CASE__			:			List[Any]=9_10					, SCREAMING_SNAKE_CASE__			:			Tuple=5_12					, SCREAMING_SNAKE_CASE__			:			int=2_48_58					, SCREAMING_SNAKE_CASE__			:			Optional[int]=True					, **SCREAMING_SNAKE_CASE__			:			str					, ):






      """simple docstring"""



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




from functools import lru_cache

@lru_cache
def  __lowerCamelCase					( _lowercase			)       ->      int:
     if num < 0:
          raise ValueError('Number should not be negative.'			)

     return 1 if num in (0, 1) else num * factorial(num - 1			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


