




from typing import List

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


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

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


class        UpperCamelCase_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    UpperCAmelCase__													=   '''efficientformer'''


    def __init__(    self   :			Tuple      ,				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.02      ,				UpperCAmelCase__   :			float = 1e-12      ,				UpperCAmelCase__   :			int = 224      ,				UpperCAmelCase__   :			float = 1e-05      ,				**UpperCAmelCase__   :			Optional[Any]      ,				)		->None:





           '''simple docstring'''

           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 argparse import ArgumentParser

from . import BaseTransformersCLICommand







def SCREAMING_SNAKE_CASE       ( lowercase_		)     -> str:



       """simple docstring"""

       return DownloadCommand(args.model				,       args.cache_dir				,       args.force				,       args.trust_remote_code		)


class        UpperCamelCase_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    @staticmethod
    def  SCREAMING_SNAKE_CASE							(    UpperCAmelCase__   :			ArgumentParser)		->Any:





           '''simple docstring'''

           A__   				=					parser.add_parser('''download''')
           download_parser.add_argument(
               '''--cache-dir'''      ,				type=UpperCAmelCase__      ,				default=UpperCAmelCase__      ,				help='''Path to location to store the models''')
           download_parser.add_argument(
               '''--force'''      ,				action='''store_true'''      ,				help='''Force the model to be download even if already in cache-dir''')
           download_parser.add_argument(
               '''--trust-remote-code'''      ,				action='''store_true'''      ,				help='''Whether or not to allow for custom models defined on the Hub in their own modeling files. Use only if you\'ve reviewed the code as it will execute on your local machine'''      ,				)
           download_parser.add_argument('''model'''      ,				type=UpperCAmelCase__      ,				help='''Name of the model to download''')
           download_parser.set_defaults(func=UpperCAmelCase__)


    def __init__(    self   :			Dict      ,				UpperCAmelCase__   :			str      ,				UpperCAmelCase__   :			str      ,				UpperCAmelCase__   :			bool      ,				UpperCAmelCase__   :			bool)		->int:





           '''simple docstring'''

           A__   				=					model
           A__   				=					cache
           A__   				=					force
           A__   				=					trust_remote_code





    def  SCREAMING_SNAKE_CASE							(    self   :			str)		->Union[str, Any]:





           '''simple docstring'''

           from ..models.auto import AutoModel, AutoTokenizer

           AutoModel.from_pretrained(
               self._model      ,				cache_dir=self._cache      ,				force_download=self._force      ,				trust_remote_code=self._trust_remote_code)
           AutoTokenizer.from_pretrained(
               self._model      ,				cache_dir=self._cache      ,				force_download=self._force      ,				trust_remote_code=self._trust_remote_code)


