






"""simple docstring"""







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


_UpperCamelCase	     =    logging.get_logger(__name__)

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







class    lowerCamelCase__   (			_UpperCAmelCase					):
    SCREAMING_SNAKE_CASE						=     '''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.02      ,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      ,):
          UpperCAmelCase							     =			vocab_size
          UpperCAmelCase							     =			max_position_embeddings
          UpperCAmelCase							     =			hidden_size
          UpperCAmelCase							     =			intermediate_size
          UpperCAmelCase							     =			num_hidden_layers
          UpperCAmelCase							     =			num_attention_heads
          UpperCAmelCase							     =			hidden_act
          UpperCAmelCase							     =			initializer_range
          UpperCAmelCase							     =			rms_norm_eps
          UpperCAmelCase							     =			use_cache
          UpperCAmelCase							     =			kwargs.pop(
              """use_memorry_efficient_attention"""      ,lowerCAmelCase__   )
          UpperCAmelCase							     =			hidden_dropout_prob
          UpperCAmelCase							     =			attention_dropout_prob
          UpperCAmelCase							     =			use_stable_embedding
          UpperCAmelCase							     =			shared_input_output_embedding
          UpperCAmelCase							     =			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 							_UpperCamelCase				(					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}'''   )
          UpperCAmelCase							     =			self.rope_scaling.get("""type"""      ,lowerCAmelCase__   )
          UpperCAmelCase							     =			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}'''   )




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


__a    :	List[Any]         =    logging.get_logger(__name__)

__a    :	List[Any]         =    {
    """MIT/ast-finetuned-audioset-10-10-0.4593""": (
        """https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json"""
    ),
}




class   _UpperCamelCase (		_UpperCAmelCase					):


			"""simple docstring"""






			__a    :					Optional[Any]     					=		'''audio-spectrogram-transformer'''





			def __init__(  self ,  lowerCAmelCase__=7_68 ,  lowerCAmelCase__=12 ,  lowerCAmelCase__=12 ,  lowerCAmelCase__=30_72 ,  lowerCAmelCase__="gelu" ,  lowerCAmelCase__=0.0 ,  lowerCAmelCase__=0.0 ,  lowerCAmelCase__=0.02 ,  lowerCAmelCase__=1E-12 ,  lowerCAmelCase__=16 ,  lowerCAmelCase__=True ,  lowerCAmelCase__=10 ,  lowerCAmelCase__=10 ,  lowerCAmelCase__=10_24 ,  lowerCAmelCase__=1_28 ,  **lowerCAmelCase__ ,  )	->   Optional[Any]:

							'''simple docstring'''


							super().__init__(**lowerCAmelCase__		)

							__lowercase					     =				hidden_size
							__lowercase					     =				num_hidden_layers
							__lowercase					     =				num_attention_heads
							__lowercase					     =				intermediate_size
							__lowercase					     =				hidden_act
							__lowercase					     =				hidden_dropout_prob
							__lowercase					     =				attention_probs_dropout_prob
							__lowercase					     =				initializer_range
							__lowercase					     =				layer_norm_eps
							__lowercase					     =				patch_size
							__lowercase					     =				qkv_bias
							__lowercase					     =				frequency_stride
							__lowercase					     =				time_stride
							__lowercase					     =				max_length
							__lowercase					     =				num_mel_bins