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


_SCREAMING_SNAKE_CASE      						=	logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE      						=	{
    """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 SCREAMING_SNAKE_CASE_						(	snake_case_						):
   __lowerCAmelCase      =							"""beit"""







   def __init__(			self		:		Union[str, Any]					,					lowerCamelCase_		:		Optional[Any]=8192					,					lowerCamelCase_		:		Dict=768					,					lowerCamelCase_		:		Dict=12					,					lowerCamelCase_		:		Optional[Any]=12					,					lowerCamelCase_		:		int=3072					,					lowerCamelCase_		:		str="gelu"					,					lowerCamelCase_		:		List[str]=0.0					,					lowerCamelCase_		:		Optional[int]=0.0					,					lowerCamelCase_		:		Any=0.0_2					,					lowerCamelCase_		:		Any=1E-12					,					lowerCamelCase_		:		str=224					,					lowerCamelCase_		:		Optional[int]=16					,					lowerCamelCase_		:		Any=3					,					lowerCamelCase_		:		Any=False					,					lowerCamelCase_		:		str=False					,					lowerCamelCase_		:		Tuple=False					,					lowerCamelCase_		:		List[str]=False					,					lowerCamelCase_		:		Dict=0.1					,					lowerCamelCase_		:		List[str]=0.1					,					lowerCamelCase_		:		Optional[int]=True					,					lowerCamelCase_		:		Optional[Any]=[3, 5, 7, 11]					,					lowerCamelCase_		:		Optional[Any]=[1, 2, 3, 6]					,					lowerCamelCase_		:		Optional[Any]=True					,					lowerCamelCase_		:		Optional[Any]=0.4					,					lowerCamelCase_		:		Optional[Any]=256					,					lowerCamelCase_		:		str=1					,					lowerCamelCase_		:		str=False					,					lowerCamelCase_		:		Union[str, Any]=255					,					**lowerCamelCase_		:		Union[str, 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 SCREAMING_SNAKE_CASE_						(	snake_case_						):
   __lowerCAmelCase      =							version.parse("""1.11"""						)







   @property
   def 		lowerCamelCase_     (			self		:		str							):





    """simple docstring"""


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







   @property
   def 		lowerCamelCase_     (			self		:		int							):





    """simple docstring"""


    return 1E-4

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


a_    					=       logging.get_logger(__name__)

a_    					=       {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}





class 		_lowercase						(					snake_case_       ):
 lowercase				     =   'megatron-bert'

 def __init__( self	:							List[str]   ,      snake_case	:							Tuple=2_9_0_5_6   ,      snake_case	:							Dict=1_0_2_4   ,      snake_case	:							Dict=2_4   ,      snake_case	:							Union[str, Any]=1_6   ,      snake_case	:							Optional[int]=4_0_9_6   ,      snake_case	:							Optional[int]="gelu"   ,      snake_case	:							Any=0.1   ,      snake_case	:							Tuple=0.1   ,      snake_case	:							Optional[int]=5_1_2   ,      snake_case	:							List[Any]=2   ,      snake_case	:							Tuple=0.02   ,      snake_case	:							Optional[Any]=1e-12   ,      snake_case	:							str=0   ,      snake_case	:							Optional[int]="absolute"   ,      snake_case	:							Union[str, Any]=True   ,      **snake_case	:							Any   ,      )   ->						List[Any]:

  """simple docstring"""





  super().__init__(pad_token_id=snake_case   ,      **snake_case			)

  UpperCamelCase_					:						Optional[Any] =					vocab_size
  UpperCamelCase_					:						Any =					hidden_size
  UpperCamelCase_					:						Union[str, Any] =					num_hidden_layers
  UpperCamelCase_					:						List[Any] =					num_attention_heads
  UpperCamelCase_					:						str =					hidden_act
  UpperCamelCase_					:						List[str] =					intermediate_size
  UpperCamelCase_					:						List[Any] =					hidden_dropout_prob
  UpperCamelCase_					:						Any =					attention_probs_dropout_prob
  UpperCamelCase_					:						Tuple =					max_position_embeddings
  UpperCamelCase_					:						Dict =					type_vocab_size
  UpperCamelCase_					:						Optional[int] =					initializer_range
  UpperCamelCase_					:						Optional[Any] =					layer_norm_eps
  UpperCamelCase_					:						Dict =					position_embedding_type
  UpperCamelCase_					:						List[str] =					use_cache



