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


a__							:	Dict  						=			logging.get_logger(__name__)

a__							:	int  						=			{
    '''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_    (       lowerCAmelCase__				):



       """simple docstring"""
       __SCREAMING_SNAKE_CASE    : Any		=   '''speech_to_text_2'''
       __SCREAMING_SNAKE_CASE    : int		=   ['''past_key_values''']
       __SCREAMING_SNAKE_CASE    : Union[str, Any]		=   {'''num_attention_heads''': '''decoder_attention_heads''', '''hidden_size''': '''d_model'''}






       def __init__(						self							,    _lowerCamelCase=1_0000							,    _lowerCamelCase=6							,    _lowerCamelCase=2048							,    _lowerCamelCase=4							,    _lowerCamelCase=0.0							,    _lowerCamelCase=True							,    _lowerCamelCase="relu"							,    _lowerCamelCase=256							,    _lowerCamelCase=0.1							,    _lowerCamelCase=0.0							,    _lowerCamelCase=0.0							,    _lowerCamelCase=0.0_2							,    _lowerCamelCase=2							,    _lowerCamelCase=True							,    _lowerCamelCase=1							,    _lowerCamelCase=0							,    _lowerCamelCase=2							,    _lowerCamelCase=1024							,    **_lowerCamelCase							,    ) ->List[str]:
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      vocab_size
           SCREAMING_SNAKE_CASE							:							int								=      d_model
           SCREAMING_SNAKE_CASE							:							List[Any]								=      decoder_ffn_dim
           SCREAMING_SNAKE_CASE							:							Any								=      decoder_layers
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      decoder_attention_heads
           SCREAMING_SNAKE_CASE							:							Any								=      dropout
           SCREAMING_SNAKE_CASE							:							Dict								=      attention_dropout
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      activation_dropout
           SCREAMING_SNAKE_CASE							:							Optional[Any]								=      activation_function
           SCREAMING_SNAKE_CASE							:							int								=      init_std
           SCREAMING_SNAKE_CASE							:							Any								=      decoder_layerdrop
           SCREAMING_SNAKE_CASE							:							Optional[Any]								=      use_cache
           SCREAMING_SNAKE_CASE							:							Optional[Any]								=      decoder_layers
           SCREAMING_SNAKE_CASE							:							int								=      scale_embedding  # scale factor will be sqrt(d_model) if True
           SCREAMING_SNAKE_CASE							:							Tuple								=      max_target_positions

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

'''simple docstring'''




def 				snake_case__							(			_A:					int      ,   _A:					int )    ->	int:

		'''simple docstring'''


		while a != 0:
				lowerCAmelCase					,     lowerCAmelCase   					=  b % a, a
		return b






def 				snake_case__							(			_A:					int      ,   _A:					int )    ->	int:

		'''simple docstring'''


		if gcd(_A      ,   _A ) != 1:
				lowerCAmelCase   					=  f"mod inverse of {a!r} and {m!r} does not exist"
				raise ValueError(_A )
		lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  1, 0, a
		lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  0, 1, m
		while va != 0:
				lowerCAmelCase   					=  ua // va
				lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase					,     lowerCAmelCase   					=  (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
		return ua % m




