





"""simple docstring"""





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


_UpperCamelCase					      =   logging.get_logger(__name__)

_UpperCamelCase					      =   {
    """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"""
				__snake_case :							int									=		'speech_to_text'
				__snake_case :							List[str]									=		['past_key_values']
				__snake_case :							Any									=		{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}




				def __init__(  self	:Any    ,     __lowercase	:Union[str, Any]=1_0000    ,     __lowercase	:List[str]=12    ,     __lowercase	:Union[str, Any]=2048    ,     __lowercase	:List[Any]=4    ,     __lowercase	:List[str]=6    ,     __lowercase	:Union[str, Any]=2048    ,     __lowercase	:str=4    ,     __lowercase	:Optional[Any]=0.0    ,     __lowercase	:Optional[int]=0.0    ,     __lowercase	:Dict=True    ,     __lowercase	:List[Any]=True    ,     __lowercase	:Dict="relu"    ,     __lowercase	:Union[str, Any]=256    ,     __lowercase	:Any=0.1    ,     __lowercase	:str=0.0    ,     __lowercase	:Union[str, Any]=0.0    ,     __lowercase	:Union[str, Any]=0.02    ,     __lowercase	:Any=2    ,     __lowercase	:Optional[int]=True    ,     __lowercase	:int=1    ,     __lowercase	:str=0    ,     __lowercase	:Optional[Any]=2    ,     __lowercase	:str=6000    ,     __lowercase	:Any=1024    ,     __lowercase	:Tuple=2    ,     __lowercase	:Any=(5, 5)    ,     __lowercase	:Any=1024    ,     __lowercase	:Optional[int]=80    ,     __lowercase	:Optional[int]=1    ,     **__lowercase	:Dict    ,     ):
											__lowerCamelCase   :   Tuple       =vocab_size
											__lowerCamelCase   :   Optional[Any]       =d_model
											__lowerCamelCase   :   int       =encoder_ffn_dim
											__lowerCamelCase   :   List[Any]       =encoder_layers
											__lowerCamelCase   :   Any       =encoder_attention_heads
											__lowerCamelCase   :   Tuple       =decoder_ffn_dim
											__lowerCamelCase   :   Tuple       =decoder_layers
											__lowerCamelCase   :   Dict       =decoder_attention_heads
											__lowerCamelCase   :   int       =dropout
											__lowerCamelCase   :   Dict       =attention_dropout
											__lowerCamelCase   :   Tuple       =activation_dropout
											__lowerCamelCase   :   Tuple       =activation_function
											__lowerCamelCase   :   Optional[Any]       =init_std
											__lowerCamelCase   :   Optional[int]       =encoder_layerdrop
											__lowerCamelCase   :   int       =decoder_layerdrop
											__lowerCamelCase   :   List[str]       =use_cache
											__lowerCamelCase   :   Optional[Any]       =encoder_layers
											__lowerCamelCase   :   List[Any]       =scale_embedding  # scale factor will be sqrt(d_model) if True
											__lowerCamelCase   :   List[Any]       =max_source_positions
											__lowerCamelCase   :   List[Any]       =max_target_positions
											__lowerCamelCase   :   Optional[int]       =num_conv_layers
											__lowerCamelCase   :   str       =list(lowerCamelCase__      )
											__lowerCamelCase   :   Optional[int]       =conv_channels
											__lowerCamelCase   :   Tuple       =input_feat_per_channel
											__lowerCamelCase   :   Dict       =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__    ,     )





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


a  :      List[Any]            =    logging.get_logger(__name__)

a  :      Union[str, Any]            =    {
    """bigcode/gpt_bigcode-santacoder""": """https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json""",
}

class 					_lowercase    (     UpperCAmelCase__			):






    '''simple docstring'''
    SCREAMING_SNAKE_CASE:				List[str]          =    'gpt_bigcode'
    SCREAMING_SNAKE_CASE:				Union[str, Any]          =    ['past_key_values']
    SCREAMING_SNAKE_CASE:				Tuple          =    {
        'hidden_size': 'n_embd',
        'max_position_embeddings': 'n_positions',
        'num_attention_heads': 'n_head',
        'num_hidden_layers': 'n_layer',
    }




    def __init__(    self       ,						lowerCamelCase__=50_257       ,						lowerCamelCase__=1_024       ,						lowerCamelCase__=768       ,						lowerCamelCase__=12       ,						lowerCamelCase__=12       ,						lowerCamelCase__=None       ,						lowerCamelCase__="gelu_pytorch_tanh"       ,						lowerCamelCase__=0.1       ,						lowerCamelCase__=0.1       ,						lowerCamelCase__=0.1       ,						lowerCamelCase__=1E-5       ,						lowerCamelCase__=0.0_2       ,						lowerCamelCase__=True       ,						lowerCamelCase__=True       ,						lowerCamelCase__=50_256       ,						lowerCamelCase__=50_256       ,						lowerCamelCase__=True       ,						lowerCamelCase__=True       ,						lowerCamelCase__=True       ,						**lowerCamelCase__       ,						):
       lowerCAmelCase_:							List[Any]       =	vocab_size
       lowerCAmelCase_:							List[str]       =	n_positions
       lowerCAmelCase_:							Union[str, Any]       =	n_embd
       lowerCAmelCase_:							Union[str, Any]       =	n_layer
       lowerCAmelCase_:							Union[str, Any]       =	n_head
       lowerCAmelCase_:							List[Any]       =	n_inner
       lowerCAmelCase_:							List[Any]       =	activation_function
       lowerCAmelCase_:							Optional[int]       =	resid_pdrop
       lowerCAmelCase_:							Union[str, Any]       =	embd_pdrop
       lowerCAmelCase_:							Any       =	attn_pdrop
       lowerCAmelCase_:							Union[str, Any]       =	layer_norm_epsilon
       lowerCAmelCase_:							Optional[Any]       =	initializer_range
       lowerCAmelCase_:							int       =	scale_attn_weights
       lowerCAmelCase_:							int       =	use_cache
       lowerCAmelCase_:							int       =	attention_softmax_in_fpaa
       lowerCAmelCase_:							int       =	scale_attention_softmax_in_fpaa
       lowerCAmelCase_:							Union[str, Any]       =	multi_query

       lowerCAmelCase_:							Union[str, Any]       =	bos_token_id
       lowerCAmelCase_:							List[str]       =	eos_token_id

       super().__init__(bos_token_id=lowerCamelCase__       ,						eos_token_id=lowerCamelCase__       ,						**lowerCamelCase__ )