
from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowercase						:      Dict									= logging.get_logger(__name__)

lowercase						:      Union[str, Any]									= {
    'kssteven/ibert-roberta-base': 'https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json',
    'kssteven/ibert-roberta-large': 'https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json',
    'kssteven/ibert-roberta-large-mnli': (
        'https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json'
    ),
}




class 				lowerCamelCase__							(       __lowercase):




	'''simple docstring'''




	_A			=  'ibert'







	def __init__(      self	:Dict  ,     a	:Union[str, Any]=3_0_5_2_2  ,     a	:Tuple=7_6_8  ,     a	:Optional[int]=1_2  ,     a	:Any=1_2  ,     a	:int=3_0_7_2  ,     a	:Tuple="gelu"  ,     a	:Any=0.1  ,     a	:List[str]=0.1  ,     a	:Any=5_1_2  ,     a	:Any=2  ,     a	:List[str]=0.02  ,     a	:List[str]=1E-1_2  ,     a	:Union[str, Any]=1  ,     a	:Any=0  ,     a	:Any=2  ,     a	:Tuple="absolute"  ,     a	:int=False  ,     a	:Optional[int]="none"  ,     **a	:Any  ,     )	->				Any:
								super().__init__(pad_token_id=a  ,     bos_token_id=a  ,     eos_token_id=a  ,     **a		)

								__UpperCamelCase			:     List[Any]         =      vocab_size
								__UpperCamelCase			:     Any         =      hidden_size
								__UpperCamelCase			:     Tuple         =      num_hidden_layers
								__UpperCamelCase			:     Optional[int]         =      num_attention_heads
								__UpperCamelCase			:     Union[str, Any]         =      hidden_act
								__UpperCamelCase			:     List[str]         =      intermediate_size
								__UpperCamelCase			:     Optional[Any]         =      hidden_dropout_prob
								__UpperCamelCase			:     int         =      attention_probs_dropout_prob
								__UpperCamelCase			:     Dict         =      max_position_embeddings
								__UpperCamelCase			:     Tuple         =      type_vocab_size
								__UpperCamelCase			:     Optional[int]         =      initializer_range
								__UpperCamelCase			:     Any         =      layer_norm_eps
								__UpperCamelCase			:     Union[str, Any]         =      position_embedding_type
								__UpperCamelCase			:     List[Any]         =      quant_mode
								__UpperCamelCase			:     Union[str, Any]         =      force_dequant




class 				lowerCamelCase__							(       __lowercase):




	'''simple docstring'''




	@property
	def      _lowerCamelCase       (      self	:Optional[Any]		)	->				Mapping[str, Mapping[int, str]]:
								if self.task == "multiple-choice":
															__UpperCamelCase			:     str         =      {0: "batch", 1: "choice", 2: "sequence"}
								else:
															__UpperCamelCase			:     int         =      {0: "batch", 1: "sequence"}
								return OrderedDict(
								    [
								        ("input_ids", dynamic_axis),
								        ("attention_mask", dynamic_axis),
								    ]		)

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  ,     )