

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


lowerCAmelCase							:  Optional[Any]            =     logging.get_logger(__name__)

lowerCAmelCase							:  str            =     {
    """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   __lowercase    (			UpperCAmelCase_     ):




			"""simple docstring"""







			_UpperCAmelCase       :							Optional[Any]      							=					'''speech_to_text_2'''
			_UpperCAmelCase       :							Optional[int]      							=					['''past_key_values''']
			_UpperCAmelCase       :							Dict      							=					{'''num_attention_heads''': '''decoder_attention_heads''', '''hidden_size''': '''d_model'''}



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

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









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase							:  Optional[int]            =						{
    """configuration_nllb_moe""": [
        """NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """NllbMoeConfig""",
    ]
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase							:  Optional[int]            =						[
						    """NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """NllbMoeForConditionalGeneration""",
						    """NllbMoeModel""",
						    """NllbMoePreTrainedModel""",
						    """NllbMoeTop2Router""",
						    """NllbMoeSparseMLP""",
						]


if TYPE_CHECKING:
						from .configuration_nllb_moe import (
						    NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    NllbMoeConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_nllb_moe import (
												    NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST,
												    NllbMoeForConditionalGeneration,
												    NllbMoeModel,
												    NllbMoePreTrainedModel,
												    NllbMoeSparseMLP,
												    NllbMoeTopaRouter,
												)


else:
						import sys

						lowerCAmelCase							:  Any            =						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






