



"""simple docstring"""


from typing import List

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


snake_case_    					=	logging.get_logger(__name__)

snake_case_    					=	{
    """snap-research/efficientformer-l1-300""": (
        """https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"""
    ),
}







class 				A_      (					SCREAMING_SNAKE_CASE_    ):



						"""simple docstring"""
						__UpperCamelCase		    =							"""efficientformer"""






						def __init__( self			:List[str]       ,  lowercase_			:List[int] = [3, 2, 6, 4]       ,  lowercase_			:List[int] = [48, 96, 2_24, 4_48]       ,  lowercase_			:List[bool] = [True, True, True, True]       ,  lowercase_			:int = 4_48       ,  lowercase_			:int = 32       ,  lowercase_			:int = 4       ,  lowercase_			:int = 7       ,  lowercase_			:int = 5       ,  lowercase_			:int = 8       ,  lowercase_			:int = 4       ,  lowercase_			:float = 0.0       ,  lowercase_			:int = 16       ,  lowercase_			:int = 3       ,  lowercase_			:int = 3       ,  lowercase_			:int = 3       ,  lowercase_			:int = 2       ,  lowercase_			:int = 1       ,  lowercase_			:float = 0.0       ,  lowercase_			:int = 1       ,  lowercase_			:bool = True       ,  lowercase_			:bool = True       ,  lowercase_			:float = 1E-5       ,  lowercase_			:str = "gelu"       ,  lowercase_			:float = 0.02       ,  lowercase_			:float = 1E-12       ,  lowercase_			:int = 2_24       ,  lowercase_			:float = 1E-05       ,  **lowercase_			:Optional[Any]       ,  )    ->      None:
												super().__init__(**lowercase_ )

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










"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


snake_case_    					=	{
    """configuration_rembert""": ["""REMBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RemBertConfig""", """RemBertOnnxConfig"""]
}

try:
				if not is_sentencepiece_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case_    					=	["""RemBertTokenizer"""]

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case_    					=	["""RemBertTokenizerFast"""]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case_    					=	[
				    """REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """RemBertForCausalLM""",
				    """RemBertForMaskedLM""",
				    """RemBertForMultipleChoice""",
				    """RemBertForQuestionAnswering""",
				    """RemBertForSequenceClassification""",
				    """RemBertForTokenClassification""",
				    """RemBertLayer""",
				    """RemBertModel""",
				    """RemBertPreTrainedModel""",
				    """load_tf_weights_in_rembert""",
				]


try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				snake_case_    					=	[
				    """TF_REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """TFRemBertForCausalLM""",
				    """TFRemBertForMaskedLM""",
				    """TFRemBertForMultipleChoice""",
				    """TFRemBertForQuestionAnswering""",
				    """TFRemBertForSequenceClassification""",
				    """TFRemBertForTokenClassification""",
				    """TFRemBertLayer""",
				    """TFRemBertModel""",
				    """TFRemBertPreTrainedModel""",
				]


if TYPE_CHECKING:
				from .configuration_rembert import REMBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RemBertConfig, RemBertOnnxConfig

				try:
								if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_rembert import RemBertTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_rembert_fast import RemBertTokenizerFast

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_rembert import (
								    REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    RemBertForCausalLM,
								    RemBertForMaskedLM,
								    RemBertForMultipleChoice,
								    RemBertForQuestionAnswering,
								    RemBertForSequenceClassification,
								    RemBertForTokenClassification,
								    RemBertLayer,
								    RemBertModel,
								    RemBertPreTrainedModel,
								    load_tf_weights_in_rembert,
								)

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_rembert import (
								    TF_REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFRemBertForCausalLM,
								    TFRemBertForMaskedLM,
								    TFRemBertForMultipleChoice,
								    TFRemBertForQuestionAnswering,
								    TFRemBertForSequenceClassification,
								    TFRemBertForTokenClassification,
								    TFRemBertLayer,
								    TFRemBertModel,
								    TFRemBertPreTrainedModel,
								)


else:
				import sys

				snake_case_    					=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





