



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


__snake_case     :str			       =logging.get_logger(__name__)

__snake_case     :Tuple			       ={
    '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        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     Tuple								=     'speech_to_text_2'
				A_   :     Union[str, Any]								=     ['past_key_values']
				A_   :     Dict								=     {'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}


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

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




import re






def  lowerCamelCase_	(      lowerCAmelCase__	:	str				)       ->							str:

							'''simple docstring'''






							if len(re.findall('[ATCG]'			,	lowerCAmelCase__				)				) != len(lowerCAmelCase__				):
														raise ValueError('Invalid Strand'				)

							return dna.translate(dna.maketrans('ATCG'			,	'TAGC'				)				)


if __name__ == "__main__":
				import doctest

				doctest.testmod()