



from typing import List

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


__snake_case     :Union[str, Any]			       =logging.get_logger(__name__)

__snake_case     :Optional[int]			       ={
    'snap-research/efficientformer-l1-300': (
        'https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json'
    ),
}



class        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     Tuple								=     'efficientformer'


				def __init__(							self      :  Union[str, Any]						, __UpperCamelCase      :  List[int] = [3, 2, 6, 4]						, __UpperCamelCase      :  List[int] = [48, 96, 224, 448]						, __UpperCamelCase      :  List[bool] = [True, True, True, True]						, __UpperCamelCase      :  int = 448						, __UpperCamelCase      :  int = 32						, __UpperCamelCase      :  int = 4						, __UpperCamelCase      :  int = 7						, __UpperCamelCase      :  int = 5						, __UpperCamelCase      :  int = 8						, __UpperCamelCase      :  int = 4						, __UpperCamelCase      :  float = 0.0						, __UpperCamelCase      :  int = 16						, __UpperCamelCase      :  int = 3						, __UpperCamelCase      :  int = 3						, __UpperCamelCase      :  int = 3						, __UpperCamelCase      :  int = 2						, __UpperCamelCase      :  int = 1						, __UpperCamelCase      :  float = 0.0						, __UpperCamelCase      :  int = 1						, __UpperCamelCase      :  bool = True						, __UpperCamelCase      :  bool = True						, __UpperCamelCase      :  float = 1e-5						, __UpperCamelCase      :  str = "gelu"						, __UpperCamelCase      :  float = 0.0_2						, __UpperCamelCase      :  float = 1e-12						, __UpperCamelCase      :  int = 224						, __UpperCamelCase      :  float = 1e-05						, **__UpperCamelCase      :  List[Any]						, )		->     None:
											super().__init__(**__UpperCamelCase       )

											A      						=    hidden_act
											A      						=    hidden_dropout_prob
											A      						=    hidden_sizes
											A      						=    num_hidden_layers
											A      						=    num_attention_heads
											A      						=    initializer_range
											A      						=    layer_norm_eps
											A      						=    patch_size
											A      						=    num_channels
											A      						=    depths
											A      						=    mlp_expansion_ratio
											A      						=    downsamples
											A      						=    dim
											A      						=    key_dim
											A      						=    attention_ratio
											A      						=    resolution
											A      						=    pool_size
											A      						=    downsample_patch_size
											A      						=    downsample_stride
											A      						=    downsample_pad
											A      						=    drop_path_rate
											A      						=    num_metaad_blocks
											A      						=    distillation
											A      						=    use_layer_scale
											A      						=    layer_scale_init_value
											A      						=    image_size
											A      						=    batch_norm_eps




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


__snake_case     :List[str]			       =logging.get_logger(__name__)

__snake_case     :int			       ={'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}



class        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     Optional[Any]								=     'openai-gpt'
				A_   :     Any								=     {
				    'max_position_embeddings': 'n_positions',
				    'hidden_size': 'n_embd',
				    'num_attention_heads': 'n_head',
				    'num_hidden_layers': 'n_layer',
				}


				def __init__(							self      :  List[Any]						, __UpperCamelCase      :  List[str]=40_478						, __UpperCamelCase      :  List[Any]=512						, __UpperCamelCase      :  List[Any]=768						, __UpperCamelCase      :  Optional[int]=12						, __UpperCamelCase      :  Dict=12						, __UpperCamelCase      :  List[str]="gelu"						, __UpperCamelCase      :  str=0.1						, __UpperCamelCase      :  Optional[Any]=0.1						, __UpperCamelCase      :  Union[str, Any]=0.1						, __UpperCamelCase      :  List[str]=1e-5						, __UpperCamelCase      :  List[Any]=0.0_2						, __UpperCamelCase      :  str="cls_index"						, __UpperCamelCase      :  int=True						, __UpperCamelCase      :  int=None						, __UpperCamelCase      :  Optional[int]=True						, __UpperCamelCase      :  Tuple=0.1						, **__UpperCamelCase      :  List[Any]						, )		->     List[str]:
											A      						=    vocab_size
											A      						=    n_positions
											A      						=    n_embd
											A      						=    n_layer
											A      						=    n_head
											A      						=    afn
											A      						=    resid_pdrop
											A      						=    embd_pdrop
											A      						=    attn_pdrop
											A      						=    layer_norm_epsilon
											A      						=    initializer_range
											A      						=    summary_type
											A      						=    summary_use_proj
											A      						=    summary_activation
											A      						=    summary_first_dropout
											A      						=    summary_proj_to_labels
											super().__init__(**__UpperCamelCase       )