



"""simple docstring"""






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


_lowercase			:			Tuple										=						logging.get_logger(__name__)

_lowercase			:			Any										=						{
    "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 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_       ):


					'''simple docstring'''





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



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

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









"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


_lowercase			:			Any										=						{
    "configuration_trocr": ["TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP", "TrOCRConfig"],
    "processing_trocr": ["TrOCRProcessor"],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase			:			List[Any]										=						[
		    "TROCR_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TrOCRForCausalLM",
		    "TrOCRPreTrainedModel",
		]


if TYPE_CHECKING:
		from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
		from .processing_trocr import TrOCRProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
		import sys

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




