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


lowercase						:      Dict									= logging.get_logger(__name__)

lowercase						:      Any									= {
    'bigcode/gpt_bigcode-santacoder': 'https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json',
}




class 				lowerCamelCase__							(       UpperCAmelCase__):




	'''simple docstring'''




	_A			=  "gpt_bigcode"
	_A			=  ["past_key_values"]
	_A			=  {
	    "hidden_size": "n_embd",
	    "max_position_embeddings": "n_positions",
	    "num_attention_heads": "n_head",
	    "num_hidden_layers": "n_layer",
	}







	def __init__(      self	:List[Any]  ,     a	:str=5_0_2_5_7  ,     a	:str=1_0_2_4  ,     a	:Optional[Any]=7_6_8  ,     a	:Dict=1_2  ,     a	:int=1_2  ,     a	:int=None  ,     a	:Optional[int]="gelu_pytorch_tanh"  ,     a	:Optional[Any]=0.1  ,     a	:Dict=0.1  ,     a	:Union[str, Any]=0.1  ,     a	:Dict=1E-5  ,     a	:List[Any]=0.02  ,     a	:Dict=True  ,     a	:List[str]=True  ,     a	:List[Any]=5_0_2_5_6  ,     a	:Union[str, Any]=5_0_2_5_6  ,     a	:List[str]=True  ,     a	:Any=True  ,     a	:Any=True  ,     **a	:Optional[Any]  ,     )	->				str:
								__UpperCamelCase			:     int         =      vocab_size
								__UpperCamelCase			:     Union[str, Any]         =      n_positions
								__UpperCamelCase			:     Optional[int]         =      n_embd
								__UpperCamelCase			:     Optional[int]         =      n_layer
								__UpperCamelCase			:     Tuple         =      n_head
								__UpperCamelCase			:     Dict         =      n_inner
								__UpperCamelCase			:     Any         =      activation_function
								__UpperCamelCase			:     Tuple         =      resid_pdrop
								__UpperCamelCase			:     Tuple         =      embd_pdrop
								__UpperCamelCase			:     Dict         =      attn_pdrop
								__UpperCamelCase			:     List[str]         =      layer_norm_epsilon
								__UpperCamelCase			:     Tuple         =      initializer_range
								__UpperCamelCase			:     int         =      scale_attn_weights
								__UpperCamelCase			:     Union[str, Any]         =      use_cache
								__UpperCamelCase			:     List[str]         =      attention_softmax_in_fpaa
								__UpperCamelCase			:     List[str]         =      scale_attention_softmax_in_fpaa
								__UpperCamelCase			:     Any         =      multi_query

								__UpperCamelCase			:     int         =      bos_token_id
								__UpperCamelCase			:     List[str]         =      eos_token_id

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

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


lowercase						:      Dict									= logging.get_logger(__name__)

lowercase						:      Optional[Any]									= {
    '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__							(       __lowercase):




	'''simple docstring'''




	_A			=  'speech_to_text_2'
	_A			=  ['past_key_values']
	_A			=  {'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}







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

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