






'''simple docstring'''







from typing import Mapping

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


_A			:    Dict					  =logging.get_logger(__name__)

_A			:    Optional[int]					  ={
    '''t5-small''': '''https://huggingface.co/t5-small/resolve/main/config.json''',
    '''t5-base''': '''https://huggingface.co/t5-base/resolve/main/config.json''',
    '''t5-large''': '''https://huggingface.co/t5-large/resolve/main/config.json''',
    '''t5-3b''': '''https://huggingface.co/t5-3b/resolve/main/config.json''',
    '''t5-11b''': '''https://huggingface.co/t5-11b/resolve/main/config.json''',
}

class _lowercase			(       _lowercase	):
							a          = """t5"""
							a          = ["""past_key_values"""]
							a          = {"""hidden_size""": """d_model""", """num_attention_heads""": """num_heads""", """num_hidden_layers""": """num_layers"""}




							def __init__(							self:       Any    ,							UpperCamelCase__:       Any=32_128    ,							UpperCamelCase__:       Optional[int]=512    ,							UpperCamelCase__:       str=64    ,							UpperCamelCase__:       str=2_048    ,							UpperCamelCase__:       Any=6    ,							UpperCamelCase__:       Tuple=None    ,							UpperCamelCase__:       Dict=8    ,							UpperCamelCase__:       List[str]=32    ,							UpperCamelCase__:       int=128    ,							UpperCamelCase__:       Any=0.1    ,							UpperCamelCase__:       Union[str, Any]=1e-6    ,							UpperCamelCase__:       Tuple=1.0    ,							UpperCamelCase__:       str="relu"    ,							UpperCamelCase__:       Dict=True    ,							UpperCamelCase__:       List[Any]=True    ,							UpperCamelCase__:       Any=0    ,							UpperCamelCase__:       int=1    ,							**UpperCamelCase__:       List[str]    ,							):
														lowerCamelCase__      :			int 						= vocab_size
														lowerCamelCase__      :			str 						= d_model
														lowerCamelCase__      :			Tuple 						= d_kv
														lowerCamelCase__      :			str 						= d_ff
														lowerCamelCase__      :			List[Any] 						= num_layers
														lowerCamelCase__      :			Tuple 						= (
														    num_decoder_layers if num_decoder_layers is not None else self.num_layers
														)  # default = symmetry
														lowerCamelCase__      :			str 						= num_heads
														lowerCamelCase__      :			Dict 						= relative_attention_num_buckets
														lowerCamelCase__      :			int 						= relative_attention_max_distance
														lowerCamelCase__      :			List[str] 						= dropout_rate
														lowerCamelCase__      :			Any 						= layer_norm_epsilon
														lowerCamelCase__      :			Dict 						= initializer_factor
														lowerCamelCase__      :			Tuple 						= feed_forward_proj
														lowerCamelCase__      :			Dict 						= use_cache

														lowerCamelCase__      :			List[Any] 						= self.feed_forward_proj.split("""-"""  )
														lowerCamelCase__      :			List[Any] 						= act_info[-1]
														lowerCamelCase__      :			Optional[int] 						= act_info[0] == """gated"""

														if len(UpperCamelCase__  ) > 1 and act_info[0] != "gated" or len(UpperCamelCase__  ) > 2:
																					raise ValueError(
																					    F'''`feed_forward_proj`: {feed_forward_proj} is not a valid activation function of the dense layer.'''
																					    """Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. """
																					    """'gated-gelu' or 'relu'"""  )

														# for backwards compatibility
														if feed_forward_proj == "gated-gelu":
																					lowerCamelCase__      :			List[str] 						= """gelu_new"""

														super().__init__(
														    pad_token_id=UpperCamelCase__    ,							eos_token_id=UpperCamelCase__    ,							is_encoder_decoder=UpperCamelCase__    ,							**UpperCamelCase__    ,							)



class _lowercase			(       _lowercase	):




							@property
							def 	lowerCamelCase_       (							self:       List[str]  ):
														lowerCamelCase__      :			Optional[int] 						= {
														    """input_ids""": {0: """batch""", 1: """encoder_sequence"""},
														    """attention_mask""": {0: """batch""", 1: """encoder_sequence"""},
														}
														if self.use_past:
																					lowerCamelCase__      :			List[str] 						= """past_encoder_sequence + sequence"""
																					lowerCamelCase__      :			Dict 						= {0: """batch"""}
																					lowerCamelCase__      :			Dict 						= {0: """batch""", 1: """past_decoder_sequence + sequence"""}
														else:
																					lowerCamelCase__      :			int 						= {0: """batch""", 1: """decoder_sequence"""}
																					lowerCamelCase__      :			Optional[Any] 						= {0: """batch""", 1: """decoder_sequence"""}

														if self.use_past:
																					self.fill_with_past_key_values_(UpperCamelCase__    ,							direction="""inputs"""  )

														return common_inputs




							@property
							def 	lowerCamelCase_       (							self:       Optional[Any]  ):
														return 13









'''simple docstring'''







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


_A			:    Union[str, Any]					  =logging.get_logger(__name__)

_A			:    List[str]					  ={
    '''MIT/ast-finetuned-audioset-10-10-0.4593''': (
        '''https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json'''
    ),
}

class _lowercase			(       _lowercase	):
							a          = """audio-spectrogram-transformer"""




							def __init__(							self:       str    ,							UpperCamelCase__:       Any=768    ,							UpperCamelCase__:       Union[str, Any]=12    ,							UpperCamelCase__:       List[Any]=12    ,							UpperCamelCase__:       int=3_072    ,							UpperCamelCase__:       Optional[Any]="gelu"    ,							UpperCamelCase__:       Optional[int]=0.0    ,							UpperCamelCase__:       Tuple=0.0    ,							UpperCamelCase__:       Union[str, Any]=0.02    ,							UpperCamelCase__:       Dict=1e-12    ,							UpperCamelCase__:       List[str]=16    ,							UpperCamelCase__:       List[str]=True    ,							UpperCamelCase__:       Any=10    ,							UpperCamelCase__:       List[str]=10    ,							UpperCamelCase__:       Any=1_024    ,							UpperCamelCase__:       Optional[Any]=128    ,							**UpperCamelCase__:       Union[str, Any]    ,							):
														super().__init__(**UpperCamelCase__  )

														lowerCamelCase__      :			List[Any] 						= hidden_size
														lowerCamelCase__      :			int 						= num_hidden_layers
														lowerCamelCase__      :			List[str] 						= num_attention_heads
														lowerCamelCase__      :			Optional[int] 						= intermediate_size
														lowerCamelCase__      :			List[Any] 						= hidden_act
														lowerCamelCase__      :			List[Any] 						= hidden_dropout_prob
														lowerCamelCase__      :			str 						= attention_probs_dropout_prob
														lowerCamelCase__      :			Dict 						= initializer_range
														lowerCamelCase__      :			List[str] 						= layer_norm_eps
														lowerCamelCase__      :			List[Any] 						= patch_size
														lowerCamelCase__      :			List[str] 						= qkv_bias
														lowerCamelCase__      :			Dict 						= frequency_stride
														lowerCamelCase__      :			List[Any] 						= time_stride
														lowerCamelCase__      :			str 						= max_length
														lowerCamelCase__      :			Dict 						= num_mel_bins

