






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


lowerCamelCase	:							Any				=logging.get_logger(__name__)

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





class 			__a  (    A__       ):
 _lowerCAmelCase       :       str        = '''open-llama'''







 def __init__(		self					:   Tuple							,   SCREAMING_SNAKE_CASE					:   Dict=10_00_00							,   SCREAMING_SNAKE_CASE					:   Tuple=40_96							,   SCREAMING_SNAKE_CASE					:   Optional[int]=1_10_08							,   SCREAMING_SNAKE_CASE					:   int=32							,   SCREAMING_SNAKE_CASE					:   List[Any]=32							,   SCREAMING_SNAKE_CASE					:   List[str]="silu"							,   SCREAMING_SNAKE_CASE					:   Optional[Any]=20_48							,   SCREAMING_SNAKE_CASE					:   str=0.0_2							,   SCREAMING_SNAKE_CASE					:   Optional[Any]=1e-6							,   SCREAMING_SNAKE_CASE					:   Dict=True							,   SCREAMING_SNAKE_CASE					:   Optional[int]=0							,   SCREAMING_SNAKE_CASE					:   Tuple=1							,   SCREAMING_SNAKE_CASE					:   List[Any]=2							,   SCREAMING_SNAKE_CASE					:   Dict=False							,   SCREAMING_SNAKE_CASE					:   str=True							,   SCREAMING_SNAKE_CASE					:   Any=0.1							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=0.1							,   SCREAMING_SNAKE_CASE					:   Optional[Any]=True							,   SCREAMING_SNAKE_CASE					:   Dict=True							,   SCREAMING_SNAKE_CASE					:   Any=None							,   **SCREAMING_SNAKE_CASE					:   int							,   ):


      '''simple docstring'''






      UpperCamelCase__			:   Optional[Any]       				=  vocab_size
      UpperCamelCase__			:   List[str]       				=  max_position_embeddings
      UpperCamelCase__			:   Union[str, Any]       				=  hidden_size
      UpperCamelCase__			:   str       				=  intermediate_size
      UpperCamelCase__			:   Union[str, Any]       				=  num_hidden_layers
      UpperCamelCase__			:   List[Any]       				=  num_attention_heads
      UpperCamelCase__			:   Optional[int]       				=  hidden_act
      UpperCamelCase__			:   Optional[int]       				=  initializer_range
      UpperCamelCase__			:   Any       				=  rms_norm_eps
      UpperCamelCase__			:   List[Any]       				=  use_cache
      UpperCamelCase__			:   Optional[int]       				=  kwargs.pop(
          "use_memorry_efficient_attention"							,   SCREAMING_SNAKE_CASE						)
      UpperCamelCase__			:   Union[str, Any]       				=  hidden_dropout_prob
      UpperCamelCase__			:   Tuple       				=  attention_dropout_prob
      UpperCamelCase__			:   List[Any]       				=  use_stable_embedding
      UpperCamelCase__			:   Any       				=  shared_input_output_embedding
      UpperCamelCase__			:   Dict       				=  rope_scaling
      self._rope_scaling_validation()

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







 def 					__lowercase					(		self					:   List[str]						):


      '''simple docstring'''






      if self.rope_scaling is None:
           return

      if not isinstance(self.rope_scaling							,   SCREAMING_SNAKE_CASE						) 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__			:   Optional[Any]       				=  self.rope_scaling.get("type"							,   SCREAMING_SNAKE_CASE						)
      UpperCamelCase__			:   Any       				=  self.rope_scaling.get("factor"							,   SCREAMING_SNAKE_CASE						)
      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(SCREAMING_SNAKE_CASE							,   SCREAMING_SNAKE_CASE						) 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


lowerCamelCase	:							Optional[int]				=logging.get_logger(__name__)

lowerCamelCase	:							Dict				={
    '''facebook/s2t-wav2vec2-large-en-de''': (
        '''https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json'''
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}





class 			__a  (    A__       ):
 _lowerCAmelCase       :       Tuple        = '''speech_to_text_2'''
 _lowerCAmelCase       :       Dict        = ['''past_key_values''']
 _lowerCAmelCase       :       Any        = {'''num_attention_heads''': '''decoder_attention_heads''', '''hidden_size''': '''d_model'''}







 def __init__(		self					:   List[str]							,   SCREAMING_SNAKE_CASE					:   Union[str, Any]=1_00_00							,   SCREAMING_SNAKE_CASE					:   List[Any]=6							,   SCREAMING_SNAKE_CASE					:   List[Any]=20_48							,   SCREAMING_SNAKE_CASE					:   Dict=4							,   SCREAMING_SNAKE_CASE					:   List[Any]=0.0							,   SCREAMING_SNAKE_CASE					:   Optional[int]=True							,   SCREAMING_SNAKE_CASE					:   List[Any]="relu"							,   SCREAMING_SNAKE_CASE					:   Tuple=2_56							,   SCREAMING_SNAKE_CASE					:   List[str]=0.1							,   SCREAMING_SNAKE_CASE					:   Tuple=0.0							,   SCREAMING_SNAKE_CASE					:   Any=0.0							,   SCREAMING_SNAKE_CASE					:   int=0.0_2							,   SCREAMING_SNAKE_CASE					:   Dict=2							,   SCREAMING_SNAKE_CASE					:   List[str]=True							,   SCREAMING_SNAKE_CASE					:   Any=1							,   SCREAMING_SNAKE_CASE					:   List[Any]=0							,   SCREAMING_SNAKE_CASE					:   Any=2							,   SCREAMING_SNAKE_CASE					:   str=10_24							,   **SCREAMING_SNAKE_CASE					:   int							,   ):


      '''simple docstring'''






      UpperCamelCase__			:   int       				=  vocab_size
      UpperCamelCase__			:   Optional[Any]       				=  d_model
      UpperCamelCase__			:   Optional[Any]       				=  decoder_ffn_dim
      UpperCamelCase__			:   str       				=  decoder_layers
      UpperCamelCase__			:   Any       				=  decoder_attention_heads
      UpperCamelCase__			:   List[str]       				=  dropout
      UpperCamelCase__			:   int       				=  attention_dropout
      UpperCamelCase__			:   Optional[int]       				=  activation_dropout
      UpperCamelCase__			:   Union[str, Any]       				=  activation_function
      UpperCamelCase__			:   Tuple       				=  init_std
      UpperCamelCase__			:   Optional[int]       				=  decoder_layerdrop
      UpperCamelCase__			:   Dict       				=  use_cache
      UpperCamelCase__			:   str       				=  decoder_layers
      UpperCamelCase__			:   Union[str, Any]       				=  scale_embedding  # scale factor will be sqrt(d_model) if True
      UpperCamelCase__			:   Optional[Any]       				=  max_target_positions

      super().__init__(
          pad_token_id=SCREAMING_SNAKE_CASE							,   bos_token_id=SCREAMING_SNAKE_CASE							,   eos_token_id=SCREAMING_SNAKE_CASE							,   decoder_start_token_id=SCREAMING_SNAKE_CASE							,   **SCREAMING_SNAKE_CASE							,   )