
'''simple docstring'''



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


_lowercase    =		logging.get_logger(__name__)

_lowercase    =		{
    """facebook/s2t-small-librispeech-asr""": (
        """https://huggingface.co/facebook/s2t-small-librispeech-asr/resolve/main/config.json"""
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech_to_text
}




class   UpperCAmelCase_					(		_SCREAMING_SNAKE_CASE			):






						'''simple docstring'''






						_lowercase		:				Optional[Any]									=       '''speech_to_text'''
						_lowercase		:				Optional[int]									=       ['''past_key_values''']
						_lowercase		:				str									=       {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}




						def __init__( self   ,       _lowercase=10_000   ,       _lowercase=12   ,       _lowercase=2_048   ,       _lowercase=4   ,       _lowercase=6   ,       _lowercase=2_048   ,       _lowercase=4   ,       _lowercase=0.0   ,       _lowercase=0.0   ,       _lowercase=True   ,       _lowercase=True   ,       _lowercase="relu"   ,       _lowercase=256   ,       _lowercase=0.1   ,       _lowercase=0.0   ,       _lowercase=0.0   ,       _lowercase=0.02   ,       _lowercase=2   ,       _lowercase=True   ,       _lowercase=1   ,       _lowercase=0   ,       _lowercase=2   ,       _lowercase=6_000   ,       _lowercase=1_024   ,       _lowercase=2   ,       _lowercase=(5, 5)   ,       _lowercase=1_024   ,       _lowercase=80   ,       _lowercase=1   ,       **_lowercase   ,       ):

												"""simple docstring"""



												_lowerCAmelCase  						=			vocab_size
												_lowerCAmelCase  						=			d_model
												_lowerCAmelCase  						=			encoder_ffn_dim
												_lowerCAmelCase  						=			encoder_layers
												_lowerCAmelCase  						=			encoder_attention_heads
												_lowerCAmelCase  						=			decoder_ffn_dim
												_lowerCAmelCase  						=			decoder_layers
												_lowerCAmelCase  						=			decoder_attention_heads
												_lowerCAmelCase  						=			dropout
												_lowerCAmelCase  						=			attention_dropout
												_lowerCAmelCase  						=			activation_dropout
												_lowerCAmelCase  						=			activation_function
												_lowerCAmelCase  						=			init_std
												_lowerCAmelCase  						=			encoder_layerdrop
												_lowerCAmelCase  						=			decoder_layerdrop
												_lowerCAmelCase  						=			use_cache
												_lowerCAmelCase  						=			encoder_layers
												_lowerCAmelCase  						=			scale_embedding  # scale factor will be sqrt(d_model) if True
												_lowerCAmelCase  						=			max_source_positions
												_lowerCAmelCase  						=			max_target_positions
												_lowerCAmelCase  						=			num_conv_layers
												_lowerCAmelCase  						=			list(_lowercase				)
												_lowerCAmelCase  						=			conv_channels
												_lowerCAmelCase  						=			input_feat_per_channel
												_lowerCAmelCase  						=			input_channels

												if len(self.conv_kernel_sizes				) != self.num_conv_layers:
																		raise ValueError(
																		    """Configuration for convolutional module is incorrect. """
																		    """It is required that `len(config.conv_kernel_sizes)` == `config.num_conv_layers` """
																		    F'but is `len(config.conv_kernel_sizes) = {len(self.conv_kernel_sizes				)}`, '
																		    F'`config.num_conv_layers = {self.num_conv_layers}`.'				)

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


'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase    =		{
    """configuration_table_transformer""": [
        """TABLE_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """TableTransformerConfig""",
        """TableTransformerOnnxConfig""",
    ]
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase    =		[
						    """TABLE_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """TableTransformerForObjectDetection""",
						    """TableTransformerModel""",
						    """TableTransformerPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_table_transformer import (
						    TABLE_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    TableTransformerConfig,
						    TableTransformerOnnxConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_table_transformer import (
												    TABLE_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TableTransformerForObjectDetection,
												    TableTransformerModel,
												    TableTransformerPreTrainedModel,
												)

else:
						import sys

						_lowercase    =		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
