






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


lowerCAmelCase_           = logging.get_logger(__name__)

lowerCAmelCase_           = {
    '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      UpperCamelCase (				snake_case__ ):







		"""simple docstring"""



		snake_case    =   "levit"
		def __init__(  self		:       Optional[int]						,_SCREAMING_SNAKE_CASE		:       List[str]=2_2_4						,_SCREAMING_SNAKE_CASE		:       str=3						,_SCREAMING_SNAKE_CASE		:       Dict=3						,_SCREAMING_SNAKE_CASE		:       Dict=2						,_SCREAMING_SNAKE_CASE		:       str=1						,_SCREAMING_SNAKE_CASE		:       List[str]=1_6						,_SCREAMING_SNAKE_CASE		:       Dict=[1_2_8, 2_5_6, 3_8_4]						,_SCREAMING_SNAKE_CASE		:       Any=[4, 8, 1_2]						,_SCREAMING_SNAKE_CASE		:       Optional[int]=[4, 4, 4]						,_SCREAMING_SNAKE_CASE		:       str=[1_6, 1_6, 1_6]						,_SCREAMING_SNAKE_CASE		:       List[str]=0						,_SCREAMING_SNAKE_CASE		:       str=[2, 2, 2]						,_SCREAMING_SNAKE_CASE		:       Optional[int]=[2, 2, 2]						,_SCREAMING_SNAKE_CASE		:       Any=0.02						,**_SCREAMING_SNAKE_CASE		:       Union[str, Any]						,)    ->   Union[str, Any]:


						'''simple docstring'''
						super().__init__(**_SCREAMING_SNAKE_CASE		)
						A	 =      image_size
						A	 =      num_channels
						A	 =      kernel_size
						A	 =      stride
						A	 =      padding
						A	 =      hidden_sizes
						A	 =      num_attention_heads
						A	 =      depths
						A	 =      key_dim
						A	 =      drop_path_rate
						A	 =      patch_size
						A	 =      attention_ratio
						A	 =      mlp_ratio
						A	 =      initializer_range
						A	 =      [
						    ['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      UpperCamelCase (				snake_case__ ):







		"""simple docstring"""



		snake_case    =   version.parse("1.11" )
		@property
		def       A(  self		:       Tuple		)    ->   Mapping[str, Mapping[int, str]]:


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







		@property
		def       A(  self		:       Dict		)    ->   float:


						'''simple docstring'''
						return 1E-4













from ...configuration_utils import PretrainedConfig
class      UpperCamelCase (				snake_case__ ):







		"""simple docstring"""



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


						'''simple docstring'''
						super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE						,bos_token_id=_SCREAMING_SNAKE_CASE						,eos_token_id=_SCREAMING_SNAKE_CASE						,**_SCREAMING_SNAKE_CASE		)

						A	 =      vocab_size
						A	 =      hidden_size
						A	 =      num_hidden_layers
						A	 =      num_attention_heads
						A	 =      hidden_act
						A	 =      intermediate_size
						A	 =      hidden_dropout_prob
						A	 =      attention_probs_dropout_prob
						A	 =      max_position_embeddings
						A	 =      initializer_range
						A	 =      layer_norm_eps
						A	 =      position_embedding_type
						A	 =      use_cache





