
'''simple docstring'''



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


UpperCamelCase__   :		int											=	logging.get_logger(__name__)

UpperCamelCase__   :		List[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  _a					(SCREAMING_SNAKE_CASE__):





       """simple docstring"""




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






       def __init__(				self							,				A__=1_00_00							,				A__=6							,				A__=20_48							,				A__=4							,				A__=0.0							,				A__=True							,				A__="relu"							,				A__=2_56							,				A__=0.1							,				A__=0.0							,				A__=0.0							,				A__=0.02							,				A__=2							,				A__=True							,				A__=1							,				A__=0							,				A__=2							,				A__=10_24							,				**A__							,				)     ->      Optional[int]:
          _SCREAMING_SNAKE_CASE  			=					vocab_size
          _SCREAMING_SNAKE_CASE  			=					d_model
          _SCREAMING_SNAKE_CASE  			=					decoder_ffn_dim
          _SCREAMING_SNAKE_CASE  			=					decoder_layers
          _SCREAMING_SNAKE_CASE  			=					decoder_attention_heads
          _SCREAMING_SNAKE_CASE  			=					dropout
          _SCREAMING_SNAKE_CASE  			=					attention_dropout
          _SCREAMING_SNAKE_CASE  			=					activation_dropout
          _SCREAMING_SNAKE_CASE  			=					activation_function
          _SCREAMING_SNAKE_CASE  			=					init_std
          _SCREAMING_SNAKE_CASE  			=					decoder_layerdrop
          _SCREAMING_SNAKE_CASE  			=					use_cache
          _SCREAMING_SNAKE_CASE  			=					decoder_layers
          _SCREAMING_SNAKE_CASE  			=					scale_embedding  # scale factor will be sqrt(d_model) if True
          _SCREAMING_SNAKE_CASE  			=					max_target_positions

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












from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE:     Any									= {
    '''configuration_pegasus_x''': ['''PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''PegasusXConfig'''],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						SCREAMING_SNAKE_CASE:     List[Any]									= [
						    '''PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''PegasusXForConditionalGeneration''',
						    '''PegasusXModel''',
						    '''PegasusXPreTrainedModel''',
						]


if TYPE_CHECKING:
						from .configuration_pegasus_x import PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP, PegasusXConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_pegasus_x import (
												    PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST,
												    PegasusXForConditionalGeneration,
												    PegasusXModel,
												    PegasusXPreTrainedModel,
												)


else:
						import sys

						SCREAMING_SNAKE_CASE:     List[Any]									= _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)