'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


__lowercase        =    {
    '''configuration_chinese_clip''': [
        '''CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ChineseCLIPConfig''',
        '''ChineseCLIPOnnxConfig''',
        '''ChineseCLIPTextConfig''',
        '''ChineseCLIPVisionConfig''',
    ],
    '''processing_chinese_clip''': ['''ChineseCLIPProcessor'''],
}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase        =    ['''ChineseCLIPFeatureExtractor''']
						__lowercase        =    ['''ChineseCLIPImageProcessor''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase        =    [
						    '''CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''ChineseCLIPModel''',
						    '''ChineseCLIPPreTrainedModel''',
						    '''ChineseCLIPTextModel''',
						    '''ChineseCLIPVisionModel''',
						]

if TYPE_CHECKING:
						from .configuration_chinese_clip import (
						    CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    ChineseCLIPConfig,
						    ChineseCLIPOnnxConfig,
						    ChineseCLIPTextConfig,
						    ChineseCLIPVisionConfig,
						)
						from .processing_chinese_clip import ChineseCLIPProcessor

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_chinese_clip import ChineseCLIPFeatureExtractor, ChineseCLIPImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_chinese_clip import (
												    CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
												    ChineseCLIPModel,
												    ChineseCLIPPreTrainedModel,
												    ChineseCLIPTextModel,
												    ChineseCLIPVisionModel,
												)

else:
						import sys

						__lowercase        =    _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





'''simple docstring'''




from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig


__lowercase        =    {
    '''albert-base-v1''': '''https://huggingface.co/albert-base-v1/resolve/main/config.json''',
    '''albert-large-v1''': '''https://huggingface.co/albert-large-v1/resolve/main/config.json''',
    '''albert-xlarge-v1''': '''https://huggingface.co/albert-xlarge-v1/resolve/main/config.json''',
    '''albert-xxlarge-v1''': '''https://huggingface.co/albert-xxlarge-v1/resolve/main/config.json''',
    '''albert-base-v2''': '''https://huggingface.co/albert-base-v2/resolve/main/config.json''',
    '''albert-large-v2''': '''https://huggingface.co/albert-large-v2/resolve/main/config.json''',
    '''albert-xlarge-v2''': '''https://huggingface.co/albert-xlarge-v2/resolve/main/config.json''',
    '''albert-xxlarge-v2''': '''https://huggingface.co/albert-xxlarge-v2/resolve/main/config.json''',
}






class 							a__(   lowerCAmelCase__      ):


			'''simple docstring'''






			UpperCAmelCase_     :	List[str]						=			'''albert'''



			def __init__(  self			,       __lowerCAmelCase=30000			,       __lowerCAmelCase=128			,       __lowerCAmelCase=4096			,       __lowerCAmelCase=12			,       __lowerCAmelCase=1			,       __lowerCAmelCase=64			,       __lowerCAmelCase=16384			,       __lowerCAmelCase=1			,       __lowerCAmelCase="gelu_new"			,       __lowerCAmelCase=0			,       __lowerCAmelCase=0			,       __lowerCAmelCase=512			,       __lowerCAmelCase=2			,       __lowerCAmelCase=0.02			,       __lowerCAmelCase=1E-1_2			,       __lowerCAmelCase=0.1			,       __lowerCAmelCase="absolute"			,       __lowerCAmelCase=0			,       __lowerCAmelCase=2			,       __lowerCAmelCase=3			,       **__lowerCAmelCase			,       ):




					"""simple docstring"""


					super().__init__(pad_token_id=__lowerCAmelCase			,       bos_token_id=__lowerCAmelCase			,       eos_token_id=__lowerCAmelCase			,       **__lowerCAmelCase)

					lowerCAmelCase     =    vocab_size
					lowerCAmelCase     =    embedding_size
					lowerCAmelCase     =    hidden_size
					lowerCAmelCase     =    num_hidden_layers
					lowerCAmelCase     =    num_hidden_groups
					lowerCAmelCase     =    num_attention_heads
					lowerCAmelCase     =    inner_group_num
					lowerCAmelCase     =    hidden_act
					lowerCAmelCase     =    intermediate_size
					lowerCAmelCase     =    hidden_dropout_prob
					lowerCAmelCase     =    attention_probs_dropout_prob
					lowerCAmelCase     =    max_position_embeddings
					lowerCAmelCase     =    type_vocab_size
					lowerCAmelCase     =    initializer_range
					lowerCAmelCase     =    layer_norm_eps
					lowerCAmelCase     =    classifier_dropout_prob
					lowerCAmelCase     =    position_embedding_type







class 							a__(   lowerCAmelCase__      ):


			'''simple docstring'''






			@property
			def 				a_			(  self):




					"""simple docstring"""


					if self.task == "multiple-choice":
							lowerCAmelCase     =    {0: """batch""", 1: """choice""", 2: """sequence"""}
					else:
							lowerCAmelCase     =    {0: """batch""", 1: """sequence"""}
					return OrderedDict(
					    [
					        ("""input_ids""", dynamic_axis),
					        ("""attention_mask""", dynamic_axis),
					        ("""token_type_ids""", dynamic_axis),
					    ])




