


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


_snake_case					:		Optional[Any]      =    logging.get_logger(__name__)

_snake_case					:		str      =    {
    "microsoft/trocr-base-handwritten": (
        "https://huggingface.co/microsoft/trocr-base-handwritten/resolve/main/config.json"
    ),
    # See all TrOCR models at https://huggingface.co/models?filter=trocr
}

class     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							Dict					  =  "trocr"
							__UpperCAmelCase   :							List[str]					  =  ["past_key_values"]
							__UpperCAmelCase   :							str					  =  {
							    "num_attention_heads": "decoder_attention_heads",
							    "hidden_size": "d_model",
							    "num_hidden_layers": "decoder_layers",
							}

							def __init__(							self	:  List[Any]   ,     lowerCamelCase	:  Optional[int]=50265   ,     lowerCamelCase	:  Optional[Any]=1024   ,     lowerCamelCase	:  Dict=12   ,     lowerCamelCase	:  Optional[Any]=16   ,     lowerCamelCase	:  Union[str, Any]=4096   ,     lowerCamelCase	:  Optional[int]="gelu"   ,     lowerCamelCase	:  Tuple=512   ,     lowerCamelCase	:  Tuple=0.1   ,     lowerCamelCase	:  Union[str, Any]=0.0   ,     lowerCamelCase	:  Tuple=0.0   ,     lowerCamelCase	:  Tuple=2   ,     lowerCamelCase	:  Optional[int]=0.02   ,     lowerCamelCase	:  Optional[int]=0.0   ,     lowerCamelCase	:  Any=True   ,     lowerCamelCase	:  str=False   ,     lowerCamelCase	:  Optional[Any]=True   ,     lowerCamelCase	:  int=True   ,     lowerCamelCase	:  Optional[int]=1   ,     lowerCamelCase	:  List[Any]=0   ,     lowerCamelCase	:  Optional[Any]=2   ,     **lowerCamelCase	:  List[str]   ,     )     ->   List[str]:
														__snake_case		:      Optional[int]										=       vocab_size
														__snake_case		:      Optional[int]										=       d_model
														__snake_case		:      int										=       decoder_layers
														__snake_case		:      Dict										=       decoder_attention_heads
														__snake_case		:      List[Any]										=       decoder_ffn_dim
														__snake_case		:      Union[str, Any]										=       activation_function
														__snake_case		:      Any										=       max_position_embeddings
														__snake_case		:      List[Any]										=       dropout
														__snake_case		:      Union[str, Any]										=       attention_dropout
														__snake_case		:      str										=       activation_dropout
														__snake_case		:      Any										=       init_std
														__snake_case		:      Union[str, Any]										=       decoder_layerdrop
														__snake_case		:      Dict										=       use_cache
														__snake_case		:      List[Any]										=       scale_embedding
														__snake_case		:      str										=       use_learned_position_embeddings
														__snake_case		:      int										=       layernorm_embedding

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





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


_snake_case					:		Any      =    logging.get_logger(__name__)

_snake_case					:		Dict      =    {
    "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     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							Union[str, Any]					  =  "speech_to_text_2"
							__UpperCAmelCase   :							Dict					  =  ["past_key_values"]
							__UpperCAmelCase   :							str					  =  {"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}

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

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

