
from typing import List

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


lowercase    :   Any		       =				logging.get_logger(__name__)

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

class __snake_case						( SCREAMING_SNAKE_CASE_	):
    _a						:		Optional[int]=							"efficientformer"
    def __init__(    self						,snake_case = [3, 2, 6, 4]						,snake_case = [48, 96, 224, 448]						,snake_case = [True, True, True, True]						,snake_case = 448						,snake_case = 32						,snake_case = 4						,snake_case = 7						,snake_case = 5						,snake_case = 8						,snake_case = 4						,snake_case = 0.0						,snake_case = 16						,snake_case = 3						,snake_case = 3						,snake_case = 3						,snake_case = 2						,snake_case = 1						,snake_case = 0.0						,snake_case = 1						,snake_case = True						,snake_case = True						,snake_case = 1e-5						,snake_case = "gelu"						,snake_case = 0.02						,snake_case = 1e-12						,snake_case = 224						,snake_case = 1e-05						,**snake_case						,):



           '''simple docstring'''







           super().__init__(**_a )

           lowercase				:	List[Any]			      = hidden_act
           lowercase				:	List[str]			      = hidden_dropout_prob
           lowercase				:	Tuple			      = hidden_sizes
           lowercase				:	Union[str, Any]			      = num_hidden_layers
           lowercase				:	Dict			      = num_attention_heads
           lowercase				:	str			      = initializer_range
           lowercase				:	Optional[int]			      = layer_norm_eps
           lowercase				:	Dict			      = patch_size
           lowercase				:	List[Any]			      = num_channels
           lowercase				:	Tuple			      = depths
           lowercase				:	List[Any]			      = mlp_expansion_ratio
           lowercase				:	List[Any]			      = downsamples
           lowercase				:	Any			      = dim
           lowercase				:	List[Any]			      = key_dim
           lowercase				:	Any			      = attention_ratio
           lowercase				:	Any			      = resolution
           lowercase				:	int			      = pool_size
           lowercase				:	Optional[int]			      = downsample_patch_size
           lowercase				:	Tuple			      = downsample_stride
           lowercase				:	Union[str, Any]			      = downsample_pad
           lowercase				:	int			      = drop_path_rate
           lowercase				:	List[Any]			      = num_metaad_blocks
           lowercase				:	int			      = distillation
           lowercase				:	List[str]			      = use_layer_scale
           lowercase				:	Dict			      = layer_scale_init_value
           lowercase				:	Any			      = image_size
           lowercase				:	int			      = batch_norm_eps





'''simple docstring'''





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


_UpperCamelCase											=		logging.get_logger(__name__)

_UpperCamelCase											=		{
    'google/pegasus-large': 'https://huggingface.co/google/pegasus-large/resolve/main/config.json',
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}






class    lowerCamelCase_       (							SCREAMING_SNAKE_CASE_	):
  """simple docstring"""




  a_				   ="""pegasus"""
  a_				   =["""past_key_values"""]
  a_				   ={"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}




  def __init__(					self :      Any     ,      _a :      int=5_0265     ,      _a :      Tuple=1024     ,      _a :      Optional[Any]=12     ,      _a :      int=4096     ,      _a :      str=16     ,      _a :      Union[str, Any]=12     ,      _a :      Optional[Any]=4096     ,      _a :      Optional[int]=16     ,      _a :      Union[str, Any]=0.0     ,      _a :      str=0.0     ,      _a :      List[Any]=True     ,      _a :      Optional[int]=True     ,      _a :      Tuple="gelu"     ,      _a :      Dict=1024     ,      _a :      int=0.1     ,      _a :      Any=0.0     ,      _a :      Union[str, Any]=0.0     ,      _a :      Any=0.02     ,      _a :      Optional[Any]=0     ,      _a :      str=False     ,      _a :      Tuple=0     ,      _a :      Optional[int]=1     ,      _a :      Union[str, Any]=1     ,      **_a :      Optional[int]     ,      )   ->   Any:
    __lowerCamelCase			:			Union[str, Any]       			=					vocab_size
    __lowerCamelCase			:			int       			=					max_position_embeddings
    __lowerCamelCase			:			Union[str, Any]       			=					d_model
    __lowerCamelCase			:			Union[str, Any]       			=					encoder_ffn_dim
    __lowerCamelCase			:			Union[str, Any]       			=					encoder_layers
    __lowerCamelCase			:			List[Any]       			=					encoder_attention_heads
    __lowerCamelCase			:			Optional[int]       			=					decoder_ffn_dim
    __lowerCamelCase			:			int       			=					decoder_layers
    __lowerCamelCase			:			Tuple       			=					decoder_attention_heads
    __lowerCamelCase			:			Optional[Any]       			=					dropout
    __lowerCamelCase			:			Tuple       			=					attention_dropout
    __lowerCamelCase			:			int       			=					activation_dropout
    __lowerCamelCase			:			Dict       			=					activation_function
    __lowerCamelCase			:			List[Any]       			=					init_std
    __lowerCamelCase			:			List[str]       			=					encoder_layerdrop
    __lowerCamelCase			:			Union[str, Any]       			=					decoder_layerdrop
    __lowerCamelCase			:			Union[str, Any]       			=					use_cache
    __lowerCamelCase			:			Tuple       			=					encoder_layers
    __lowerCamelCase			:			int       			=					scale_embedding  # scale factor will be sqrt(d_model) if True
    super().__init__(
        pad_token_id=_a     ,      eos_token_id=_a     ,      is_encoder_decoder=_a     ,      decoder_start_token_id=_a     ,      forced_eos_token_id=_a     ,      **_a     ,      )




  @property
  def 		_lowercase	(					self :      Optional[int]  )   ->   int:
    return self.encoder_attention_heads




  @property
  def 		_lowercase	(					self :      Any  )   ->   int:
    return self.d_model






