


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_snake_case					:		Tuple      =    {
    "configuration_roberta": ["ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP", "RobertaConfig", "RobertaOnnxConfig"],
    "tokenization_roberta": ["RobertaTokenizer"],
}

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case					:		Union[str, Any]      =    ["RobertaTokenizerFast"]

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case					:		Optional[Any]      =    [
			    "ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "RobertaForCausalLM",
			    "RobertaForMaskedLM",
			    "RobertaForMultipleChoice",
			    "RobertaForQuestionAnswering",
			    "RobertaForSequenceClassification",
			    "RobertaForTokenClassification",
			    "RobertaModel",
			    "RobertaPreTrainedModel",
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case					:		str      =    [
			    "TF_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "TFRobertaForCausalLM",
			    "TFRobertaForMaskedLM",
			    "TFRobertaForMultipleChoice",
			    "TFRobertaForQuestionAnswering",
			    "TFRobertaForSequenceClassification",
			    "TFRobertaForTokenClassification",
			    "TFRobertaMainLayer",
			    "TFRobertaModel",
			    "TFRobertaPreTrainedModel",
			]

try:
			if not is_flax_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_snake_case					:		Dict      =    [
			    "FlaxRobertaForCausalLM",
			    "FlaxRobertaForMaskedLM",
			    "FlaxRobertaForMultipleChoice",
			    "FlaxRobertaForQuestionAnswering",
			    "FlaxRobertaForSequenceClassification",
			    "FlaxRobertaForTokenClassification",
			    "FlaxRobertaModel",
			    "FlaxRobertaPreTrainedModel",
			]


if TYPE_CHECKING:
			from .configuration_roberta import ROBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, RobertaConfig, RobertaOnnxConfig
			from .tokenization_roberta import RobertaTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_roberta_fast import RobertaTokenizerFast

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_roberta import (
						    ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
						    RobertaForCausalLM,
						    RobertaForMaskedLM,
						    RobertaForMultipleChoice,
						    RobertaForQuestionAnswering,
						    RobertaForSequenceClassification,
						    RobertaForTokenClassification,
						    RobertaModel,
						    RobertaPreTrainedModel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_roberta import (
						    TF_ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFRobertaForCausalLM,
						    TFRobertaForMaskedLM,
						    TFRobertaForMultipleChoice,
						    TFRobertaForQuestionAnswering,
						    TFRobertaForSequenceClassification,
						    TFRobertaForTokenClassification,
						    TFRobertaMainLayer,
						    TFRobertaModel,
						    TFRobertaPreTrainedModel,
						)

			try:
						if not is_flax_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_flax_roberta import (
						    FlaxRobertaForCausalLM,
						    FlaxRobertaForMaskedLM,
						    FlaxRobertaForMultipleChoice,
						    FlaxRobertaForQuestionAnswering,
						    FlaxRobertaForSequenceClassification,
						    FlaxRobertaForTokenClassification,
						    FlaxRobertaModel,
						    FlaxRobertaPreTrainedModel,
						)

else:
			import sys

			_snake_case					:		List[str]      =    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





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


_snake_case					:		Any      =    logging.get_logger(__name__)

_snake_case					:		Dict      =    {
    "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     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							Union[str, Any]					  =  "speech_to_text_2"
							__UpperCAmelCase   :							Dict					  =  ["past_key_values"]
							__UpperCAmelCase   :							str					  =  {"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}

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

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

