


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


a					  =     logging.get_logger(__name__)

a					  =     {
    '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        UpperCamelCase__   (	__magic_name__   ):
					__SCREAMING_SNAKE_CASE       :  str						=   'speech_to_text_2'
					__SCREAMING_SNAKE_CASE       :  str						=   ['past_key_values']
					__SCREAMING_SNAKE_CASE       :  Dict						=   {'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}

					def __init__(     self       :   Optional[Any]							,					UpperCamelCase__       :   Union[str, Any]=10_000							,					UpperCamelCase__       :   List[str]=6							,					UpperCamelCase__       :   Optional[int]=2_048							,					UpperCamelCase__       :   int=4							,					UpperCamelCase__       :   List[Any]=0.0							,					UpperCamelCase__       :   int=True							,					UpperCamelCase__       :   str="relu"							,					UpperCamelCase__       :   int=256							,					UpperCamelCase__       :   Union[str, Any]=0.1							,					UpperCamelCase__       :   Any=0.0							,					UpperCamelCase__       :   Optional[int]=0.0							,					UpperCamelCase__       :   Optional[Any]=0.02							,					UpperCamelCase__       :   List[Any]=2							,					UpperCamelCase__       :   List[Any]=True							,					UpperCamelCase__       :   Optional[Any]=1							,					UpperCamelCase__       :   List[Any]=0							,					UpperCamelCase__       :   Any=2							,					UpperCamelCase__       :   Union[str, Any]=1_024							,					**UpperCamelCase__       :   str							,					):






										'''simple docstring'''






										lowercase_  							=			vocab_size
										lowercase_  							=			d_model
										lowercase_  							=			decoder_ffn_dim
										lowercase_  							=			decoder_layers
										lowercase_  							=			decoder_attention_heads
										lowercase_  							=			dropout
										lowercase_  							=			attention_dropout
										lowercase_  							=			activation_dropout
										lowercase_  							=			activation_function
										lowercase_  							=			init_std
										lowercase_  							=			decoder_layerdrop
										lowercase_  							=			use_cache
										lowercase_  							=			decoder_layers
										lowercase_  							=			scale_embedding  # scale factor will be sqrt(d_model) if True
										lowercase_  							=			max_target_positions

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






from typing import TYPE_CHECKING

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


a					  =     {
    'configuration_trocr': ['TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TrOCRConfig'],
    'processing_trocr': ['TrOCRProcessor'],
}


try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a					  =     [
							    '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

							a					  =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


