

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


a_     =			logging.get_logger(__name__)

a_     =			{
    '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							(							__A      ):
			'''simple docstring'''







			lowerCamelCase__							='speech_to_text'
			lowerCamelCase__							=['past_key_values']
			lowerCamelCase__							={'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}
			def __init__(	self							:       Optional[int]					,					a							:       Optional[int]=1_0000					,					a							:       Any=12					,					a							:       List[Any]=2048					,					a							:       Any=4					,					a							:       str=6					,					a							:       List[str]=2048					,					a							:       str=4					,					a							:       Tuple=0.0					,					a							:       Dict=0.0					,					a							:       Union[str, Any]=True					,					a							:       Any=True					,					a							:       Tuple="relu"					,					a							:       int=256					,					a							:       Dict=0.1					,					a							:       int=0.0					,					a							:       List[str]=0.0					,					a							:       Dict=0.02					,					a							:       Tuple=2					,					a							:       Tuple=True					,					a							:       Optional[Any]=1					,					a							:       int=0					,					a							:       Tuple=2					,					a							:       str=6000					,					a							:       List[Any]=1024					,					a							:       int=2					,					a							:       Optional[Any]=(5, 5)					,					a							:       Dict=1024					,					a							:       int=80					,					a							:       Optional[int]=1					,					**a							:       str					,					)							->				List[str]:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE      :					Union[str, Any]    =				vocab_size
				SCREAMING_SNAKE_CASE      :					str    =				d_model
				SCREAMING_SNAKE_CASE      :					Union[str, Any]    =				encoder_ffn_dim
				SCREAMING_SNAKE_CASE      :					Any    =				encoder_layers
				SCREAMING_SNAKE_CASE      :					int    =				encoder_attention_heads
				SCREAMING_SNAKE_CASE      :					List[Any]    =				decoder_ffn_dim
				SCREAMING_SNAKE_CASE      :					Any    =				decoder_layers
				SCREAMING_SNAKE_CASE      :					Optional[int]    =				decoder_attention_heads
				SCREAMING_SNAKE_CASE      :					Optional[Any]    =				dropout
				SCREAMING_SNAKE_CASE      :					str    =				attention_dropout
				SCREAMING_SNAKE_CASE      :					Optional[Any]    =				activation_dropout
				SCREAMING_SNAKE_CASE      :					str    =				activation_function
				SCREAMING_SNAKE_CASE      :					Any    =				init_std
				SCREAMING_SNAKE_CASE      :					Any    =				encoder_layerdrop
				SCREAMING_SNAKE_CASE      :					int    =				decoder_layerdrop
				SCREAMING_SNAKE_CASE      :					Tuple    =				use_cache
				SCREAMING_SNAKE_CASE      :					Optional[int]    =				encoder_layers
				SCREAMING_SNAKE_CASE      :					str    =				scale_embedding  # scale factor will be sqrt(d_model) if True
				SCREAMING_SNAKE_CASE      :					Union[str, Any]    =				max_source_positions
				SCREAMING_SNAKE_CASE      :					str    =				max_target_positions
				SCREAMING_SNAKE_CASE      :					Optional[int]    =				num_conv_layers
				SCREAMING_SNAKE_CASE      :					Union[str, Any]    =				list(a		)
				SCREAMING_SNAKE_CASE      :					Optional[int]    =				conv_channels
				SCREAMING_SNAKE_CASE      :					Dict    =				input_feat_per_channel
				SCREAMING_SNAKE_CASE      :					Optional[Any]    =				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=a					,					bos_token_id=a					,					eos_token_id=a					,					is_encoder_decoder=a					,					decoder_start_token_id=a					,					**a					,					)



"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


A     :   Optional[int]			    =			{
    "configuration_altclip": [
        "ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "AltCLIPConfig",
        "AltCLIPTextConfig",
        "AltCLIPVisionConfig",
    ],
    "processing_altclip": ["AltCLIPProcessor"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A     :   Tuple			    =			[
	    "ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST",
	    "AltCLIPPreTrainedModel",
	    "AltCLIPModel",
	    "AltCLIPTextModel",
	    "AltCLIPVisionModel",
	]


if TYPE_CHECKING:
	from .configuration_altclip import (
	    ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    AltCLIPConfig,
	    AltCLIPTextConfig,
	    AltCLIPVisionConfig,
	)
	from .processing_altclip import AltCLIPProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_altclip import (
		    ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
		    AltCLIPModel,
		    AltCLIPPreTrainedModel,
		    AltCLIPTextModel,
		    AltCLIPVisionModel,
		)


else:
	import sys

	A     :   int			    =			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




