
"""simple docstring"""




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


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

_A     :			Dict  						=			{
    '''s-JoL/Open-Llama-V1''': '''https://huggingface.co/s-JoL/Open-Llama-V1/blob/main/config.json''',
}

class 						a__		( __a		):
   __lowerCAmelCase				=							'open-llama'
   def __init__(     self      ,       _a=100_000      ,       _a=4_096      ,       _a=11_008      ,       _a=32      ,       _a=32      ,       _a="silu"      ,       _a=2_048      ,       _a=0.0_2      ,       _a=1E-6      ,       _a=True      ,       _a=0      ,       _a=1      ,       _a=2      ,       _a=False      ,       _a=True      ,       _a=0.1      ,       _a=0.1      ,       _a=True      ,       _a=True      ,       _a=None      ,       **_a      ,       ):
          lowercase       :							Optional[Any]									=				vocab_size
          lowercase       :							Union[str, Any]									=				max_position_embeddings
          lowercase       :							Optional[int]									=				hidden_size
          lowercase       :							Any									=				intermediate_size
          lowercase       :							Union[str, Any]									=				num_hidden_layers
          lowercase       :							List[Any]									=				num_attention_heads
          lowercase       :							Tuple									=				hidden_act
          lowercase       :							Dict									=				initializer_range
          lowercase       :							List[str]									=				rms_norm_eps
          lowercase       :							str									=				use_cache
          lowercase       :							List[str]									=				kwargs.pop(
              "use_memorry_efficient_attention"      ,       _lowerCamelCase							)
          lowercase       :							Optional[int]									=				hidden_dropout_prob
          lowercase       :							Union[str, Any]									=				attention_dropout_prob
          lowercase       :							str									=				use_stable_embedding
          lowercase       :							Optional[int]									=				shared_input_output_embedding
          lowercase       :							Any									=				rope_scaling
          self._rope_scaling_validation()

          super().__init__(
              pad_token_id=_lowerCamelCase      ,       bos_token_id=_lowerCamelCase      ,       eos_token_id=_lowerCamelCase      ,       tie_word_embeddings=_lowerCamelCase      ,       **_lowerCamelCase      ,       )

   def      __magic_name__     (     self							):
          if self.rope_scaling is None:
                 return

          if not isinstance(self.rope_scaling      ,       _lowerCamelCase							) or len(self.rope_scaling							) != 2:
                 raise ValueError(
                     "`rope_scaling` must be a dictionary with with two fields, `name` and `factor`, "
                     f"""got {self.rope_scaling}"""							)
          lowercase       :							Dict									=				self.rope_scaling.get("type"      ,       _lowerCamelCase							)
          lowercase       :							str									=				self.rope_scaling.get("factor"      ,       _lowerCamelCase							)
          if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]:
                 raise ValueError(
                     f"""`rope_scaling`\'s name field must be one of [\'linear\', \'dynamic\'], got {rope_scaling_type}"""							)
          if rope_scaling_factor is None or not isinstance(_lowerCamelCase      ,       _lowerCamelCase							) or rope_scaling_factor <= 1.0:
                 raise ValueError(f"""`rope_scaling`\'s factor field must be an float > 1, got {rope_scaling_factor}"""							)



'''simple docstring'''

from collections import OrderedDict
from typing import List, Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


A_     :						Tuple    							=logging.get_logger(__name__)

A_     :						Dict    							={
    '''google/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}


class     __UpperCAmelCase       ( __a		):
  __A :				Union[str, Any]											= 'efficientnet'





  def __init__(	self    ,     _lowerCamelCase = 3    ,     _lowerCamelCase = 600    ,     _lowerCamelCase = 2.0    ,     _lowerCamelCase = 3.1    ,     _lowerCamelCase = 8    ,     _lowerCamelCase = [3, 3, 5, 3, 5, 5, 3]    ,     _lowerCamelCase = [32, 16, 24, 40, 80, 112, 192]    ,     _lowerCamelCase = [16, 24, 40, 80, 112, 192, 320]    ,     _lowerCamelCase = []    ,     _lowerCamelCase = [1, 2, 2, 2, 1, 2, 1]    ,     _lowerCamelCase = [1, 2, 2, 3, 3, 4, 1]    ,     _lowerCamelCase = [1, 6, 6, 6, 6, 6, 6]    ,     _lowerCamelCase = 0.25    ,     _lowerCamelCase = "swish"    ,     _lowerCamelCase = 2560    ,     _lowerCamelCase = "mean"    ,     _lowerCamelCase = 0.02    ,     _lowerCamelCase = 0.0_01    ,     _lowerCamelCase = 0.99    ,     _lowerCamelCase = 0.5    ,     _lowerCamelCase = 0.2    ,     **_lowerCamelCase    ,     ):
     super().__init__(**_lowerCamelCase )

     lowerCAmelCase_			=      num_channels
     lowerCAmelCase_			=      image_size
     lowerCAmelCase_			=      width_coefficient
     lowerCAmelCase_			=      depth_coefficient
     lowerCAmelCase_			=      depth_divisor
     lowerCAmelCase_			=      kernel_sizes
     lowerCAmelCase_			=      in_channels
     lowerCAmelCase_			=      out_channels
     lowerCAmelCase_			=      depthwise_padding
     lowerCAmelCase_			=      strides
     lowerCAmelCase_			=      num_block_repeats
     lowerCAmelCase_			=      expand_ratios
     lowerCAmelCase_			=      squeeze_expansion_ratio
     lowerCAmelCase_			=      hidden_act
     lowerCAmelCase_			=      hidden_dim
     lowerCAmelCase_			=      pooling_type
     lowerCAmelCase_			=      initializer_range
     lowerCAmelCase_			=      batch_norm_eps
     lowerCAmelCase_			=      batch_norm_momentum
     lowerCAmelCase_			=      dropout_rate
     lowerCAmelCase_			=      drop_connect_rate
     lowerCAmelCase_			=      sum(_lowerCamelCase ) * 4






class     __UpperCAmelCase       ( __a		):
  __A :				str											= version.parse('1.11'		)





  @property
  def 						UpperCAmelCase_	(	self ):
     return OrderedDict(
         [
             ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
         ] )







  @property
  def 						UpperCAmelCase_	(	self ):
     return 1E-5





