





'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase_   :       Optional[int]       =     {
    "configuration_table_transformer": [
        "TABLE_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "TableTransformerConfig",
        "TableTransformerOnnxConfig",
    ]
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_   :       Any       =     [
					    "TABLE_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "TableTransformerForObjectDetection",
					    "TableTransformerModel",
					    "TableTransformerPreTrainedModel",
					]


if TYPE_CHECKING:
					from .configuration_table_transformer import (
					    TABLE_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    TableTransformerConfig,
					    TableTransformerOnnxConfig,
					)

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_table_transformer import (
										    TABLE_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TableTransformerForObjectDetection,
										    TableTransformerModel,
										    TableTransformerPreTrainedModel,
										)

else:
					import sys

					lowerCAmelCase_   :       Any       =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




'''simple docstring'''






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


__A   :    str											= logging.get_logger(__name__)

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






class   __snake_case			(  _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase  					=   'roc_bert'

    def __init__(  self       :    str       ,		lowerCamelCase       :    Optional[Any]=3_05_22       ,		lowerCamelCase       :    List[Any]=7_68       ,		lowerCamelCase       :    int=12       ,		lowerCamelCase       :    str=12       ,		lowerCamelCase       :    Any=30_72       ,		lowerCamelCase       :    List[Any]="gelu"       ,		lowerCamelCase       :    Optional[int]=0.1       ,		lowerCamelCase       :    List[str]=0.1       ,		lowerCamelCase       :    int=5_12       ,		lowerCamelCase       :    List[Any]=2       ,		lowerCamelCase       :    int=0.02       ,		lowerCamelCase       :    str=1E-12       ,		lowerCamelCase       :    int=True       ,		lowerCamelCase       :    Optional[Any]=0       ,		lowerCamelCase       :    List[Any]="absolute"       ,		lowerCamelCase       :    str=None       ,		lowerCamelCase       :    str=True       ,		lowerCamelCase       :    Tuple=True       ,		lowerCamelCase       :    str=7_68       ,		lowerCamelCase       :    str=9_10       ,		lowerCamelCase       :    Tuple=5_12       ,		lowerCamelCase       :    List[str]=2_48_58       ,		lowerCamelCase       :    Dict=True       ,		**lowerCamelCase       :    Tuple       ,		)  ->    Optional[int]:
      lowerCAmelCase_     : Optional[Any]     =  vocab_size
      lowerCAmelCase_     : Any     =  max_position_embeddings
      lowerCAmelCase_     : Any     =  hidden_size
      lowerCAmelCase_     : int     =  num_hidden_layers
      lowerCAmelCase_     : Tuple     =  num_attention_heads
      lowerCAmelCase_     : List[Any]     =  intermediate_size
      lowerCAmelCase_     : Tuple     =  hidden_act
      lowerCAmelCase_     : List[Any]     =  hidden_dropout_prob
      lowerCAmelCase_     : Dict     =  attention_probs_dropout_prob
      lowerCAmelCase_     : Any     =  initializer_range
      lowerCAmelCase_     : Any     =  type_vocab_size
      lowerCAmelCase_     : Optional[int]     =  layer_norm_eps
      lowerCAmelCase_     : Tuple     =  use_cache
      lowerCAmelCase_     : List[Any]     =  enable_pronunciation
      lowerCAmelCase_     : List[Any]     =  enable_shape
      lowerCAmelCase_     : List[str]     =  pronunciation_embed_dim
      lowerCAmelCase_     : List[str]     =  pronunciation_vocab_size
      lowerCAmelCase_     : Dict     =  shape_embed_dim
      lowerCAmelCase_     : Optional[Any]     =  shape_vocab_size
      lowerCAmelCase_     : List[Any]     =  concat_input
      lowerCAmelCase_     : Any     =  position_embedding_type
      lowerCAmelCase_     : List[str]     =  classifier_dropout
      super().__init__(pad_token_id=lowerCamelCase       ,		**lowerCamelCase						)



