


'''simple docstring'''




import warnings

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


__snake_case    						=logging.get_logger(__name__)

__snake_case    						={
    """RUCAIBox/mvp""": """https://huggingface.co/RUCAIBox/mvp/resolve/main/config.json""",
}

class 		UpperCAmelCase_      (  __lowercase		):
     lowerCamelCase				:	str		=     '''mvp'''
     lowerCamelCase				:	str		=     ['''past_key_values''']
     lowerCamelCase				:	Tuple		=     {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}





     def __init__( self       :      List[str]    ,      UpperCAmelCase__       :      List[Any]=5_0_2_6_7    ,      UpperCAmelCase__       :      Union[str, Any]=1_0_2_4    ,      UpperCAmelCase__       :      Union[str, Any]=1_2    ,      UpperCAmelCase__       :      Optional[Any]=4_0_9_6    ,      UpperCAmelCase__       :      str=1_6    ,      UpperCAmelCase__       :      List[str]=1_2    ,      UpperCAmelCase__       :      int=4_0_9_6    ,      UpperCAmelCase__       :      List[Any]=1_6    ,      UpperCAmelCase__       :      List[Any]=0.0    ,      UpperCAmelCase__       :      Union[str, Any]=0.0    ,      UpperCAmelCase__       :      Any="gelu"    ,      UpperCAmelCase__       :      Optional[Any]=1_0_2_4    ,      UpperCAmelCase__       :      Union[str, Any]=0.1    ,      UpperCAmelCase__       :      List[Any]=0.0    ,      UpperCAmelCase__       :      Optional[int]=0.0    ,      UpperCAmelCase__       :      str=0.02    ,      UpperCAmelCase__       :      Optional[int]=0.0    ,      UpperCAmelCase__       :      str=False    ,      UpperCAmelCase__       :      int=True    ,      UpperCAmelCase__       :      Tuple=1    ,      UpperCAmelCase__       :      Optional[int]=0    ,      UpperCAmelCase__       :      int=2    ,      UpperCAmelCase__       :      List[str]=True    ,      UpperCAmelCase__       :      Any=2    ,      UpperCAmelCase__       :      List[str]=2    ,      UpperCAmelCase__       :      Optional[int]=False    ,      UpperCAmelCase__       :      Union[str, Any]=1_0_0    ,      UpperCAmelCase__       :      Tuple=8_0_0    ,      **UpperCAmelCase__       :      Optional[int]    ,      )				->  List[str]:
        lowerCAmelCase     =			vocab_size
        lowerCAmelCase     =			max_position_embeddings
        lowerCAmelCase     =			d_model
        lowerCAmelCase     =			encoder_ffn_dim
        lowerCAmelCase     =			encoder_layers
        lowerCAmelCase     =			encoder_attention_heads
        lowerCAmelCase     =			decoder_ffn_dim
        lowerCAmelCase     =			decoder_layers
        lowerCAmelCase     =			decoder_attention_heads
        lowerCAmelCase     =			dropout
        lowerCAmelCase     =			attention_dropout
        lowerCAmelCase     =			activation_dropout
        lowerCAmelCase     =			activation_function
        lowerCAmelCase     =			init_std
        lowerCAmelCase     =			encoder_layerdrop
        lowerCAmelCase     =			decoder_layerdrop
        lowerCAmelCase     =			classifier_dropout
        lowerCAmelCase     =			use_cache
        lowerCAmelCase     =			encoder_layers
        lowerCAmelCase     =			scale_embedding  # scale factor will be sqrt(d_model) if True
        lowerCAmelCase     =			use_prompt
        lowerCAmelCase     =			prompt_length
        lowerCAmelCase     =			prompt_mid_dim

        super().__init__(
            pad_token_id=UpperCAmelCase__    ,      bos_token_id=UpperCAmelCase__    ,      eos_token_id=UpperCAmelCase__    ,      is_encoder_decoder=UpperCAmelCase__    ,      decoder_start_token_id=UpperCAmelCase__    ,      forced_eos_token_id=UpperCAmelCase__    ,      **UpperCAmelCase__    ,      )

        if self.forced_bos_token_id is None and kwargs.get('force_bos_token_to_be_generated'    ,      UpperCAmelCase__    ):
           lowerCAmelCase     =			self.bos_token_id
           warnings.warn(
               F'''Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. '''
               'The config can simply be saved and uploaded again to be fixed.'    )









'''simple docstring'''




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


__snake_case    						=logging.get_logger(__name__)

__snake_case    						={
    """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 		UpperCAmelCase_      (  __lowercase		):
     lowerCamelCase				:	Union[str, Any]		=     '''speech_to_text_2'''
     lowerCamelCase				:	Any		=     ['''past_key_values''']
     lowerCamelCase				:	Optional[Any]		=     {'''num_attention_heads''': '''decoder_attention_heads''', '''hidden_size''': '''d_model'''}





     def __init__( self       :      Optional[int]    ,      UpperCAmelCase__       :      Optional[Any]=1_0_0_0_0    ,      UpperCAmelCase__       :      int=6    ,      UpperCAmelCase__       :      Optional[Any]=2_0_4_8    ,      UpperCAmelCase__       :      Union[str, Any]=4    ,      UpperCAmelCase__       :      List[Any]=0.0    ,      UpperCAmelCase__       :      str=True    ,      UpperCAmelCase__       :      str="relu"    ,      UpperCAmelCase__       :      Any=2_5_6    ,      UpperCAmelCase__       :      Optional[Any]=0.1    ,      UpperCAmelCase__       :      Any=0.0    ,      UpperCAmelCase__       :      Tuple=0.0    ,      UpperCAmelCase__       :      List[Any]=0.02    ,      UpperCAmelCase__       :      List[Any]=2    ,      UpperCAmelCase__       :      str=True    ,      UpperCAmelCase__       :      List[str]=1    ,      UpperCAmelCase__       :      Any=0    ,      UpperCAmelCase__       :      Dict=2    ,      UpperCAmelCase__       :      int=1_0_2_4    ,      **UpperCAmelCase__       :      Optional[Any]    ,      )				->  Dict:
        lowerCAmelCase     =			vocab_size
        lowerCAmelCase     =			d_model
        lowerCAmelCase     =			decoder_ffn_dim
        lowerCAmelCase     =			decoder_layers
        lowerCAmelCase     =			decoder_attention_heads
        lowerCAmelCase     =			dropout
        lowerCAmelCase     =			attention_dropout
        lowerCAmelCase     =			activation_dropout
        lowerCAmelCase     =			activation_function
        lowerCAmelCase     =			init_std
        lowerCAmelCase     =			decoder_layerdrop
        lowerCAmelCase     =			use_cache
        lowerCAmelCase     =			decoder_layers
        lowerCAmelCase     =			scale_embedding  # scale factor will be sqrt(d_model) if True
        lowerCAmelCase     =			max_target_positions

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





