
"""simple docstring"""



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


_snake_case          =						logging.get_logger(__name__)

_snake_case          =						{
    '''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        _SCREAMING_SNAKE_CASE  (  UpperCamelCase_							):






				'''simple docstring'''



				SCREAMING_SNAKE_CASE_:							Optional[int]							=					"speech_to_text"
				SCREAMING_SNAKE_CASE_:							str							=					["past_key_values"]
				SCREAMING_SNAKE_CASE_:							Optional[int]							=					{"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}


				def __init__(					self	:			Optional[Any]				,     UpperCAmelCase_	:			Dict=10_000				,     UpperCAmelCase_	:			Union[str, Any]=12				,     UpperCAmelCase_	:			Union[str, Any]=2_048				,     UpperCAmelCase_	:			str=4				,     UpperCAmelCase_	:			Any=6				,     UpperCAmelCase_	:			int=2_048				,     UpperCAmelCase_	:			List[Any]=4				,     UpperCAmelCase_	:			Dict=0.0				,     UpperCAmelCase_	:			Any=0.0				,     UpperCAmelCase_	:			int=True				,     UpperCAmelCase_	:			Optional[int]=True				,     UpperCAmelCase_	:			Union[str, Any]="relu"				,     UpperCAmelCase_	:			Dict=256				,     UpperCAmelCase_	:			Optional[int]=0.1				,     UpperCAmelCase_	:			List[str]=0.0				,     UpperCAmelCase_	:			Optional[int]=0.0				,     UpperCAmelCase_	:			List[str]=0.02				,     UpperCAmelCase_	:			Dict=2				,     UpperCAmelCase_	:			Any=True				,     UpperCAmelCase_	:			int=1				,     UpperCAmelCase_	:			int=0				,     UpperCAmelCase_	:			Optional[Any]=2				,     UpperCAmelCase_	:			Tuple=6_000				,     UpperCAmelCase_	:			Dict=1_024				,     UpperCAmelCase_	:			Union[str, Any]=2				,     UpperCAmelCase_	:			Any=(5, 5)				,     UpperCAmelCase_	:			Optional[int]=1_024				,     UpperCAmelCase_	:			str=80				,     UpperCAmelCase_	:			Tuple=1				,     **UpperCAmelCase_	:			List[str]				,     )		->  str:







											"""simple docstring"""




											_lowerCAmelCase  	=			vocab_size
											_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  	=			use_cache
											_lowerCAmelCase  	=			encoder_layers
											_lowerCAmelCase  	=			scale_embedding  # scale factor will be sqrt(d_model) if True
											_lowerCAmelCase  	=			max_source_positions
											_lowerCAmelCase  	=			max_target_positions
											_lowerCAmelCase  	=			num_conv_layers
											_lowerCAmelCase  	=			list(__a  )
											_lowerCAmelCase  	=			conv_channels
											_lowerCAmelCase  	=			input_feat_per_channel
											_lowerCAmelCase  	=			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=__a				,     bos_token_id=__a				,     eos_token_id=__a				,     is_encoder_decoder=__a				,     decoder_start_token_id=__a				,     **__a				,     )








"""simple docstring"""



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


_snake_case          =						logging.get_logger(__name__)

_snake_case          =						{
    '''abeja/gpt-neox-japanese-2.7b''': '''https://huggingface.co/abeja/gpt-neox-japanese-2.7b/resolve/main/config.json''',
}
class        _SCREAMING_SNAKE_CASE  (  UpperCAmelCase							):






				'''simple docstring'''



				SCREAMING_SNAKE_CASE_:							Dict							=					"gpt_neox_japanese"


				def __init__(					self	:			Optional[Any]				,     UpperCAmelCase_	:			Any=32_000				,     UpperCAmelCase_	:			Dict=2_560				,     UpperCAmelCase_	:			Union[str, Any]=32				,     UpperCAmelCase_	:			Any=32				,     UpperCAmelCase_	:			Optional[Any]=4				,     UpperCAmelCase_	:			int="gelu"				,     UpperCAmelCase_	:			Union[str, Any]=1.00				,     UpperCAmelCase_	:			Any=10_000				,     UpperCAmelCase_	:			Optional[int]=2_048				,     UpperCAmelCase_	:			Optional[Any]=0.02				,     UpperCAmelCase_	:			Tuple=1E-5				,     UpperCAmelCase_	:			int=True				,     UpperCAmelCase_	:			Tuple=31_996				,     UpperCAmelCase_	:			List[Any]=31_999				,     UpperCAmelCase_	:			str=0.1				,     UpperCAmelCase_	:			List[Any]=0.0				,     **UpperCAmelCase_	:			str				,     )		->  int:







											"""simple docstring"""




											super().__init__(bos_token_id=UpperCAmelCase_				,     eos_token_id=UpperCAmelCase_				,     **UpperCAmelCase_  )
											_lowerCAmelCase  	=			vocab_size
											_lowerCAmelCase  	=			max_position_embeddings
											_lowerCAmelCase  	=			hidden_size
											_lowerCAmelCase  	=			num_hidden_layers
											_lowerCAmelCase  	=			num_attention_heads
											_lowerCAmelCase  	=			intermediate_multiple_size
											_lowerCAmelCase  	=			hidden_act
											_lowerCAmelCase  	=			rotary_pct
											_lowerCAmelCase  	=			rotary_emb_base
											_lowerCAmelCase  	=			initializer_range
											_lowerCAmelCase  	=			layer_norm_eps
											_lowerCAmelCase  	=			use_cache
											_lowerCAmelCase  	=			attention_dropout
											_lowerCAmelCase  	=			hidden_dropout






