






"""simple docstring"""

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


lowercase__          = logging.get_logger(__name__)

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


class 		__lowerCamelCase				( A__			):





		'''simple docstring'''






		a_	:				Optional[Any]            =							"""roc_bert"""





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








"""simple docstring"""

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


lowercase__          = {
    """configuration_clip""": [
        """CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """CLIPConfig""",
        """CLIPOnnxConfig""",
        """CLIPTextConfig""",
        """CLIPVisionConfig""",
    ],
    """processing_clip""": ["""CLIPProcessor"""],
    """tokenization_clip""": ["""CLIPTokenizer"""],
}

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowercase__          = ["""CLIPTokenizerFast"""]

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowercase__          = ["""CLIPFeatureExtractor"""]
					lowercase__          = ["""CLIPImageProcessor"""]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowercase__          = [
					    """CLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """CLIPModel""",
					    """CLIPPreTrainedModel""",
					    """CLIPTextModel""",
					    """CLIPTextModelWithProjection""",
					    """CLIPVisionModel""",
					    """CLIPVisionModelWithProjection""",
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowercase__          = [
					    """TF_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """TFCLIPModel""",
					    """TFCLIPPreTrainedModel""",
					    """TFCLIPTextModel""",
					    """TFCLIPVisionModel""",
					]

try:
					if not is_flax_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowercase__          = [
					    """FlaxCLIPModel""",
					    """FlaxCLIPPreTrainedModel""",
					    """FlaxCLIPTextModel""",
					    """FlaxCLIPTextPreTrainedModel""",
					    """FlaxCLIPVisionModel""",
					    """FlaxCLIPVisionPreTrainedModel""",
					]


if TYPE_CHECKING:
					from .configuration_clip import (
					    CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    CLIPConfig,
					    CLIPOnnxConfig,
					    CLIPTextConfig,
					    CLIPVisionConfig,
					)
					from .processing_clip import CLIPProcessor
					from .tokenization_clip import CLIPTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_clip_fast import CLIPTokenizerFast

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .feature_extraction_clip import CLIPFeatureExtractor
										from .image_processing_clip import CLIPImageProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_clip import (
										    CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
										    CLIPModel,
										    CLIPPreTrainedModel,
										    CLIPTextModel,
										    CLIPTextModelWithProjection,
										    CLIPVisionModel,
										    CLIPVisionModelWithProjection,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_clip import (
										    TF_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFCLIPModel,
										    TFCLIPPreTrainedModel,
										    TFCLIPTextModel,
										    TFCLIPVisionModel,
										)

					try:
										if not is_flax_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flax_clip import (
										    FlaxCLIPModel,
										    FlaxCLIPPreTrainedModel,
										    FlaxCLIPTextModel,
										    FlaxCLIPTextPreTrainedModel,
										    FlaxCLIPVisionModel,
										    FlaxCLIPVisionPreTrainedModel,
										)


else:
					import sys

					lowercase__          = _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
