



from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__A       =						logging.get_logger(__name__)

__A       =						{
    '''facebook/data2vec-text-base''': '''https://huggingface.co/data2vec/resolve/main/config.json''',
}






class 		lowercase						(			snake_case__):






	"""simple docstring"""


	a__				: List[str]		       =							"data2vec-text"




	def __init__(     self     :						str						,  __UpperCAmelCase     :						str=30_522						,  __UpperCAmelCase     :						Union[str, Any]=768						,  __UpperCAmelCase     :						Optional[Any]=12						,  __UpperCAmelCase     :						Any=12						,  __UpperCAmelCase     :						Optional[Any]=3_072						,  __UpperCAmelCase     :						Optional[Any]="gelu"						,  __UpperCAmelCase     :						Any=0.1						,  __UpperCAmelCase     :						Dict=0.1						,  __UpperCAmelCase     :						Optional[Any]=512						,  __UpperCAmelCase     :						Union[str, Any]=2						,  __UpperCAmelCase     :						int=0.02						,  __UpperCAmelCase     :						Tuple=1E-12						,  __UpperCAmelCase     :						List[str]=1						,  __UpperCAmelCase     :						List[str]=0						,  __UpperCAmelCase     :						str=2						,  __UpperCAmelCase     :						Optional[int]="absolute"						,  __UpperCAmelCase     :						Optional[Any]=True						,  __UpperCAmelCase     :						Optional[int]=None						,  **__UpperCAmelCase     :						List[str]						,  )      ->			Tuple:
							super().__init__(pad_token_id=__UpperCAmelCase						,  bos_token_id=__UpperCAmelCase						,  eos_token_id=__UpperCAmelCase						,  **__UpperCAmelCase					)

							UpperCAmelCase_=       vocab_size
							UpperCAmelCase_=       hidden_size
							UpperCAmelCase_=       num_hidden_layers
							UpperCAmelCase_=       num_attention_heads
							UpperCAmelCase_=       hidden_act
							UpperCAmelCase_=       intermediate_size
							UpperCAmelCase_=       hidden_dropout_prob
							UpperCAmelCase_=       attention_probs_dropout_prob
							UpperCAmelCase_=       max_position_embeddings
							UpperCAmelCase_=       type_vocab_size
							UpperCAmelCase_=       initializer_range
							UpperCAmelCase_=       layer_norm_eps
							UpperCAmelCase_=       position_embedding_type
							UpperCAmelCase_=       use_cache
							UpperCAmelCase_=       classifier_dropout






class 		lowercase						(			snake_case__):






	"""simple docstring"""


	@property
	def   _SCREAMING_SNAKE_CASE		(     self     :						int					)      ->			Mapping[str, Mapping[int, str]]:
							if self.task == "multiple-choice":
													UpperCAmelCase_=       {0: """batch""", 1: """choice""", 2: """sequence"""}
							else:
													UpperCAmelCase_=       {0: """batch""", 1: """sequence"""}
							return OrderedDict(
							    [
							        ("""input_ids""", dynamic_axis),
							        ("""attention_mask""", dynamic_axis),
							    ]					)









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,
)


__A       =						{
    '''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:
	__A       =						['''CLIPTokenizerFast''']

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

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

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

try:
	if not is_flax_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__A       =						[
	    '''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

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




