
"""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


UpperCamelCase__          =	logging.get_logger(__name__)

UpperCamelCase__          =	{
    'facebook/levit-128S': 'https://huggingface.co/facebook/levit-128S/resolve/main/config.json',
    # See all LeViT models at https://huggingface.co/models?filter=levit
}





class 				a			(					lowercase      ):
      UpperCamelCase							:   Tuple           =     """levit"""



      def __init__(   self     ,	UpperCamelCase_=224     ,	UpperCamelCase_=3     ,	UpperCamelCase_=3     ,	UpperCamelCase_=2     ,	UpperCamelCase_=1     ,	UpperCamelCase_=16     ,	UpperCamelCase_=[128, 256, 384]     ,	UpperCamelCase_=[4, 8, 12]     ,	UpperCamelCase_=[4, 4, 4]     ,	UpperCamelCase_=[16, 16, 16]     ,	UpperCamelCase_=0     ,	UpperCamelCase_=[2, 2, 2]     ,	UpperCamelCase_=[2, 2, 2]     ,	UpperCamelCase_=0.02     ,	**UpperCamelCase_     ,	):
          super().__init__(**UpperCamelCase_      )
          UpperCAmelCase__	:      Optional[Any]     							=					image_size
          UpperCAmelCase__	:      Optional[Any]     							=					num_channels
          UpperCAmelCase__	:      Any     							=					kernel_size
          UpperCAmelCase__	:      Optional[Any]     							=					stride
          UpperCAmelCase__	:      Optional[Any]     							=					padding
          UpperCAmelCase__	:      Union[str, Any]     							=					hidden_sizes
          UpperCAmelCase__	:      Dict     							=					num_attention_heads
          UpperCAmelCase__	:      Union[str, Any]     							=					depths
          UpperCAmelCase__	:      List[str]     							=					key_dim
          UpperCAmelCase__	:      List[str]     							=					drop_path_rate
          UpperCAmelCase__	:      Any     							=					patch_size
          UpperCAmelCase__	:      int     							=					attention_ratio
          UpperCAmelCase__	:      Union[str, Any]     							=					mlp_ratio
          UpperCAmelCase__	:      Optional[Any]     							=					initializer_range
          UpperCAmelCase__	:      List[str]     							=					[
              ['Subsample', key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
              ['Subsample', key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
          ]





class 				a			(					lowercase      ):
      UpperCamelCase							:   Tuple           =     version.parse("""1.11"""      )



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



      @property
      def  __snake_case							(   self      ):
          return 1E-4



"""simple docstring"""



from ...configuration_utils import PretrainedConfig





class 				a			(					lowercase      ):
      UpperCamelCase							:   Union[str, Any]           =     """bert-generation"""



      def __init__(   self     ,	UpperCamelCase_=50_358     ,	UpperCamelCase_=1_024     ,	UpperCamelCase_=24     ,	UpperCamelCase_=16     ,	UpperCamelCase_=4_096     ,	UpperCamelCase_="gelu"     ,	UpperCamelCase_=0.1     ,	UpperCamelCase_=0.1     ,	UpperCamelCase_=512     ,	UpperCamelCase_=0.02     ,	UpperCamelCase_=1E-12     ,	UpperCamelCase_=0     ,	UpperCamelCase_=2     ,	UpperCamelCase_=1     ,	UpperCamelCase_="absolute"     ,	UpperCamelCase_=True     ,	**UpperCamelCase_     ,	):
          super().__init__(pad_token_id=UpperCamelCase_     ,	bos_token_id=UpperCamelCase_     ,	eos_token_id=UpperCamelCase_     ,	**UpperCamelCase_      )

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

