






'''simple docstring'''

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


A:      Dict  				=				logging.get_logger(__name__)

A:      Optional[Any]  				=				{
    "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 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      int        =  'speech_to_text'
	SCREAMING_SNAKE_CASE_					:      Union[str, Any]        =  ['past_key_values']
	SCREAMING_SNAKE_CASE_					:      Optional[int]        =  {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}
	def __init__(							self  ,      _lowercase=1_0000  ,      _lowercase=12  ,      _lowercase=2048  ,      _lowercase=4  ,      _lowercase=6  ,      _lowercase=2048  ,      _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=6000  ,      _lowercase=1024  ,      _lowercase=2  ,      _lowercase=(5, 5)  ,      _lowercase=1024  ,      _lowercase=80  ,      _lowercase=1  ,      **_lowercase  ,      )						->  List[str]:
							lowercase_      :   List[Any]        =			vocab_size
							lowercase_      :   str        =			d_model
							lowercase_      :   Optional[Any]        =			encoder_ffn_dim
							lowercase_      :   Tuple        =			encoder_layers
							lowercase_      :   int        =			encoder_attention_heads
							lowercase_      :   List[str]        =			decoder_ffn_dim
							lowercase_      :   List[str]        =			decoder_layers
							lowercase_      :   List[str]        =			decoder_attention_heads
							lowercase_      :   List[Any]        =			dropout
							lowercase_      :   List[Any]        =			attention_dropout
							lowercase_      :   List[str]        =			activation_dropout
							lowercase_      :   List[Any]        =			activation_function
							lowercase_      :   Any        =			init_std
							lowercase_      :   List[Any]        =			encoder_layerdrop
							lowercase_      :   Dict        =			decoder_layerdrop
							lowercase_      :   str        =			use_cache
							lowercase_      :   List[Any]        =			encoder_layers
							lowercase_      :   Optional[Any]        =			scale_embedding  # scale factor will be sqrt(d_model) if True
							lowercase_      :   Any        =			max_source_positions
							lowercase_      :   str        =			max_target_positions
							lowercase_      :   Dict        =			num_conv_layers
							lowercase_      :   List[str]        =			list(_lowercase       )
							lowercase_      :   Optional[int]        =			conv_channels
							lowercase_      :   Optional[int]        =			input_feat_per_channel
							lowercase_      :   int        =			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


A:      int  				=				{
    "configuration_trajectory_transformer": [
        "TRAJECTORY_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "TrajectoryTransformerConfig",
    ],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A:      Union[str, Any]  				=				[
						    "TRAJECTORY_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "TrajectoryTransformerModel",
						    "TrajectoryTransformerPreTrainedModel",
						    "load_tf_weights_in_trajectory_transformer",
						]


if TYPE_CHECKING:
						from .configuration_trajectory_transformer import (
						    TRAJECTORY_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    TrajectoryTransformerConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_trajectory_transformer import (
												    TRAJECTORY_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TrajectoryTransformerModel,
												    TrajectoryTransformerPreTrainedModel,
												    load_tf_weights_in_trajectory_transformer,
												)


else:
						import sys

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