





'''simple docstring'''





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


lowercase_		:				List[str]				=						logging.get_logger(__name__)

lowercase_		:				List[Any]				=						{
    '''facebook/s2t-small-librispeech-asr''': (
        '''https://huggingface.co/facebook/s2t-small-librispeech-asr/resolve/main/config.json'''
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech_to_text
}


class 			lowercase				(							__lowerCAmelCase     ):



						"""simple docstring"""

						_UpperCamelCase  :	Union[str, Any]								=	'''speech_to_text'''
						_UpperCamelCase  :	List[str]								=	['''past_key_values''']
						_UpperCamelCase  :	str								=	{'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}







						def __init__(    self			:		Optional[Any] ,				lowerCamelCase_			:		Tuple=1_00_00 ,				lowerCamelCase_			:		Optional[Any]=12 ,				lowerCamelCase_			:		Optional[Any]=20_48 ,				lowerCamelCase_			:		Optional[Any]=4 ,				lowerCamelCase_			:		str=6 ,				lowerCamelCase_			:		List[Any]=20_48 ,				lowerCamelCase_			:		Any=4 ,				lowerCamelCase_			:		Optional[int]=0.0 ,				lowerCamelCase_			:		Tuple=0.0 ,				lowerCamelCase_			:		Tuple=True ,				lowerCamelCase_			:		Optional[int]=True ,				lowerCamelCase_			:		Union[str, Any]="relu" ,				lowerCamelCase_			:		Any=2_56 ,				lowerCamelCase_			:		Tuple=0.1 ,				lowerCamelCase_			:		Optional[int]=0.0 ,				lowerCamelCase_			:		int=0.0 ,				lowerCamelCase_			:		List[str]=0.02 ,				lowerCamelCase_			:		List[str]=2 ,				lowerCamelCase_			:		int=True ,				lowerCamelCase_			:		str=1 ,				lowerCamelCase_			:		List[Any]=0 ,				lowerCamelCase_			:		Optional[int]=2 ,				lowerCamelCase_			:		List[str]=60_00 ,				lowerCamelCase_			:		Any=10_24 ,				lowerCamelCase_			:		Tuple=2 ,				lowerCamelCase_			:		Union[str, Any]=(5, 5) ,				lowerCamelCase_			:		Optional[int]=10_24 ,				lowerCamelCase_			:		Union[str, Any]=80 ,				lowerCamelCase_			:		str=1 ,				**lowerCamelCase_			:		Dict ,				):





										'''simple docstring'''







										_snake_case :			Any  						=   vocab_size
										_snake_case :			Union[str, Any]  						=   d_model
										_snake_case :			List[str]  						=   encoder_ffn_dim
										_snake_case :			List[Any]  						=   encoder_layers
										_snake_case :			Union[str, Any]  						=   encoder_attention_heads
										_snake_case :			Any  						=   decoder_ffn_dim
										_snake_case :			Dict  						=   decoder_layers
										_snake_case :			Tuple  						=   decoder_attention_heads
										_snake_case :			int  						=   dropout
										_snake_case :			Optional[Any]  						=   attention_dropout
										_snake_case :			Optional[int]  						=   activation_dropout
										_snake_case :			Optional[Any]  						=   activation_function
										_snake_case :			int  						=   init_std
										_snake_case :			Dict  						=   encoder_layerdrop
										_snake_case :			Optional[Any]  						=   decoder_layerdrop
										_snake_case :			Dict  						=   use_cache
										_snake_case :			Any  						=   encoder_layers
										_snake_case :			List[Any]  						=   scale_embedding  # scale factor will be sqrt(d_model) if True
										_snake_case :			int  						=   max_source_positions
										_snake_case :			List[Any]  						=   max_target_positions
										_snake_case :			int  						=   num_conv_layers
										_snake_case :			Any  						=   list(lowerCAmelCase_					)
										_snake_case :			str  						=   conv_channels
										_snake_case :			str  						=   input_feat_per_channel
										_snake_case :			str  						=   input_channels

										if len(self.conv_kernel_sizes					) != self.num_conv_layers:
														raise ValueError(
														    'Configuration for convolutional module is incorrect. '
														    'It is required that `len(config.conv_kernel_sizes)` == `config.num_conv_layers` '
														    f'''but is `len(config.conv_kernel_sizes) = {len(self.conv_kernel_sizes					)}`, '''
														    f'''`config.num_conv_layers = {self.num_conv_layers}`.'''					)

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













def       A__(		__lowerCAmelCase ):
				assert column_title.isupper()
				_snake_case :			List[Any]  						=   0
				_snake_case :			List[str]  						=   len(__lowerCAmelCase ) - 1
				_snake_case :			Dict  						=   0

				while index >= 0:
								_snake_case :			List[str]  						=   (ord(column_title[index] ) - 64) * pow(26	,			__lowerCAmelCase )
								answer += value
								power += 1
								index -= 1

				return answer


if __name__ == "__main__":
		from doctest import testmod

		testmod()






