



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


__snake_case						:str				=					logging.get_logger(__name__)

__snake_case						:int				=					{
    '''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    _A	(     _UpperCAmelCase   ):
       UpperCamelCase__  :   Optional[Any]						 =						"beit"



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


           '''simple docstring'''

           super().__init__(**_UpperCAmelCase)

           __a							=    vocab_size
           __a							=    hidden_size
           __a							=    num_hidden_layers
           __a							=    num_attention_heads
           __a							=    intermediate_size
           __a							=    hidden_act
           __a							=    hidden_dropout_prob
           __a							=    attention_probs_dropout_prob
           __a							=    initializer_range
           __a							=    layer_norm_eps

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


class    _A	(     _UpperCAmelCase   ):
       UpperCamelCase__  :   Dict						 =						version.parse('''1.11'''   )



       @property
       def 		_lowerCamelCase      (		self							:					int):


           '''simple docstring'''

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





       @property
       def 		_lowerCamelCase      (		self							:					Union[str, Any]):


           '''simple docstring'''

           return 1E-4










from typing import TYPE_CHECKING

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


__snake_case						:Tuple						=					{
    '''configuration_bloom''': ['''BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''BloomConfig''', '''BloomOnnxConfig'''],
}
try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __snake_case						:List[Any]						=					['''BloomTokenizerFast''']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __snake_case						:Any						=					[
     '''BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''BloomForCausalLM''',
     '''BloomModel''',
     '''BloomPreTrainedModel''',
     '''BloomForSequenceClassification''',
     '''BloomForTokenClassification''',
     '''BloomForQuestionAnswering''',
 ]

if TYPE_CHECKING:
 from .configuration_bloom import BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP, BloomConfig, BloomOnnxConfig

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_bloom_fast import BloomTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_bloom import (
      BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST,
      BloomForCausalLM,
      BloomForQuestionAnswering,
      BloomForSequenceClassification,
      BloomForTokenClassification,
      BloomModel,
      BloomPreTrainedModel,
  )

else:
 import sys

 __snake_case						:Any						=					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





