




"""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__			=		logging.get_logger(__name__)

lowercase__			=		{
    """facebook/deit-base-distilled-patch16-224""": (
        """https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json"""
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}






class lowerCAmelCase__      (	lowercase		):






			'''simple docstring'''



			lowerCamelCase__ =     """deit"""
			def __init__(    self    , lowercase=768    , lowercase=12    , lowercase=12    , lowercase=3072    , lowercase="gelu"    , lowercase=0.0    , lowercase=0.0    , lowercase=0.02    , lowercase=1E-12    , lowercase=224    , lowercase=16    , lowercase=3    , lowercase=True    , lowercase=16    , **lowercase    , ):
							super().__init__(**lowercase    )

							_lowerCamelCase	:     str       =       hidden_size
							_lowerCamelCase	:     Any       =       num_hidden_layers
							_lowerCamelCase	:     Optional[int]       =       num_attention_heads
							_lowerCamelCase	:     Dict       =       intermediate_size
							_lowerCamelCase	:     Union[str, Any]       =       hidden_act
							_lowerCamelCase	:     List[str]       =       hidden_dropout_prob
							_lowerCamelCase	:     Union[str, Any]       =       attention_probs_dropout_prob
							_lowerCamelCase	:     Optional[Any]       =       initializer_range
							_lowerCamelCase	:     Dict       =       layer_norm_eps
							_lowerCamelCase	:     List[str]       =       image_size
							_lowerCamelCase	:     Optional[Any]       =       patch_size
							_lowerCamelCase	:     Optional[Any]       =       num_channels
							_lowerCamelCase	:     Tuple       =       qkv_bias
							_lowerCamelCase	:     Optional[int]       =       encoder_stride






class lowerCAmelCase__      (	lowercase		):






			'''simple docstring'''



			lowerCamelCase__ =     version.parse("""1.11"""		)
			@property
			def    A_       (    self    ):
							return OrderedDict(
							    [
							        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
							    ]    )






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





"""simple docstring"""






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


lowercase__			=		logging.get_logger(__name__)

lowercase__			=		{"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}






class lowerCAmelCase__      (	lowercase		):






			'''simple docstring'''



			lowerCamelCase__ =     """openai-gpt"""
			lowerCamelCase__ =     {
			    """max_position_embeddings""": """n_positions""",
			    """hidden_size""": """n_embd""",
			    """num_attention_heads""": """n_head""",
			    """num_hidden_layers""": """n_layer""",
			}
			def __init__(    self    , lowercase=40478    , lowercase=512    , lowercase=768    , lowercase=12    , lowercase=12    , lowercase="gelu"    , lowercase=0.1    , lowercase=0.1    , lowercase=0.1    , lowercase=1E-5    , lowercase=0.02    , lowercase="cls_index"    , lowercase=True    , lowercase=None    , lowercase=True    , lowercase=0.1    , **lowercase    , ):
							_lowerCamelCase	:     Tuple       =       vocab_size
							_lowerCamelCase	:     List[str]       =       n_positions
							_lowerCamelCase	:     Tuple       =       n_embd
							_lowerCamelCase	:     Optional[int]       =       n_layer
							_lowerCamelCase	:     List[Any]       =       n_head
							_lowerCamelCase	:     Dict       =       afn
							_lowerCamelCase	:     Union[str, Any]       =       resid_pdrop
							_lowerCamelCase	:     Dict       =       embd_pdrop
							_lowerCamelCase	:     List[Any]       =       attn_pdrop
							_lowerCamelCase	:     Any       =       layer_norm_epsilon
							_lowerCamelCase	:     List[Any]       =       initializer_range
							_lowerCamelCase	:     List[Any]       =       summary_type
							_lowerCamelCase	:     List[str]       =       summary_use_proj
							_lowerCamelCase	:     Tuple       =       summary_activation
							_lowerCamelCase	:     int       =       summary_first_dropout
							_lowerCamelCase	:     str       =       summary_proj_to_labels
							super().__init__(**lowercase    )