


'''simple docstring'''



from collections import OrderedDict
from typing import Mapping

from packaging import version

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


_lowercase    :    Any			     =  logging.get_logger(__name__)

_lowercase    :    Dict			     =  {
    """microsoft/beit-base-patch16-224-pt22k""": (
        """https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"""
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}






class  UpperCamelCase__(     lowerCAmelCase ):
				__magic_name__       :   Dict							= "beit"




				def __init__(	self    :				List[Any]   ,					lowerCAmelCase    :				str=8192   ,					lowerCAmelCase    :				Dict=768   ,					lowerCAmelCase    :				int=12   ,					lowerCAmelCase    :				Optional[Any]=12   ,					lowerCAmelCase    :				Optional[int]=3072   ,					lowerCAmelCase    :				Dict="gelu"   ,					lowerCAmelCase    :				Optional[int]=0.0   ,					lowerCAmelCase    :				Optional[int]=0.0   ,					lowerCAmelCase    :				Optional[Any]=0.02   ,					lowerCAmelCase    :				Union[str, Any]=1E-12   ,					lowerCAmelCase    :				Optional[Any]=224   ,					lowerCAmelCase    :				Union[str, Any]=16   ,					lowerCAmelCase    :				str=3   ,					lowerCAmelCase    :				str=False   ,					lowerCAmelCase    :				str=False   ,					lowerCAmelCase    :				int=False   ,					lowerCAmelCase    :				List[str]=False   ,					lowerCAmelCase    :				Dict=0.1   ,					lowerCAmelCase    :				str=0.1   ,					lowerCAmelCase    :				int=True   ,					lowerCAmelCase    :				Any=[3, 5, 7, 11]   ,					lowerCAmelCase    :				Union[str, Any]=[1, 2, 3, 6]   ,					lowerCAmelCase    :				List[str]=True   ,					lowerCAmelCase    :				str=0.4   ,					lowerCAmelCase    :				Optional[Any]=256   ,					lowerCAmelCase    :				Optional[Any]=1   ,					lowerCAmelCase    :				Any=False   ,					lowerCAmelCase    :				Any=255   ,					**lowerCAmelCase    :				Optional[Any]   ,					)->  Optional[Any]:

										"""simple docstring"""




										super().__init__(**lowerCAmelCase   )

										UpperCAmelCase         =			vocab_size
										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         =			layer_norm_eps

										UpperCAmelCase         =			image_size
										UpperCAmelCase         =			patch_size
										UpperCAmelCase         =			num_channels
										UpperCAmelCase         =			use_mask_token
										UpperCAmelCase         =			use_absolute_position_embeddings
										UpperCAmelCase         =			use_relative_position_bias
										UpperCAmelCase         =			use_shared_relative_position_bias
										UpperCAmelCase         =			layer_scale_init_value
										UpperCAmelCase         =			drop_path_rate
										UpperCAmelCase         =			use_mean_pooling
										# decode head attributes (semantic segmentation)
										UpperCAmelCase         =			out_indices
										UpperCAmelCase         =			pool_scales
										# auxiliary head attributes (semantic segmentation)
										UpperCAmelCase         =			use_auxiliary_head
										UpperCAmelCase         =			auxiliary_loss_weight
										UpperCAmelCase         =			auxiliary_channels
										UpperCAmelCase         =			auxiliary_num_convs
										UpperCAmelCase         =			auxiliary_concat_input
										UpperCAmelCase         =			semantic_loss_ignore_index







class  UpperCamelCase__(     lowerCAmelCase ):
				__magic_name__       :   Dict							= version.parse("1.11" )




				@property
				def   a__(	self    :				str   )->  Mapping[str, Mapping[int, str]]:

										"""simple docstring"""




										return OrderedDict(
										    [
										        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
										    ]   )





				@property
				def   a__(	self    :				Optional[int]   )->  float:

										"""simple docstring"""




										return 1E-4









'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


_lowercase    :    Any			     =  {
    """configuration_gpt_bigcode""": ["""GPT_BIGCODE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTBigCodeConfig"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase    :    Optional[int]			     =  [
	    """GPT_BIGCODE_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """GPTBigCodeForSequenceClassification""",
	    """GPTBigCodeForTokenClassification""",
	    """GPTBigCodeForCausalLM""",
	    """GPTBigCodeModel""",
	    """GPTBigCodePreTrainedModel""",
	]

if TYPE_CHECKING:
	from .configuration_gpt_bigcode import GPT_BIGCODE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTBigCodeConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_gpt_bigcode import (
		    GPT_BIGCODE_PRETRAINED_MODEL_ARCHIVE_LIST,
		    GPTBigCodeForCausalLM,
		    GPTBigCodeForSequenceClassification,
		    GPTBigCodeForTokenClassification,
		    GPTBigCodeModel,
		    GPTBigCodePreTrainedModel,
		)


else:
	import sys

	_lowercase    :    Tuple			     =  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





