






'''simple docstring'''



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


__UpperCamelCase      :       Tuple      			=      logging.get_logger(__name__)

__UpperCamelCase      :       int      			=      {
    """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 							__SCREAMING_SNAKE_CASE       (							_lowerCAmelCase     ):
      __a  					="trocr"
      __a  					=["past_key_values"]
      __a  					={
          "num_attention_heads": "decoder_attention_heads",
          "hidden_size": "d_model",
          "num_hidden_layers": "decoder_layers",
      }




      def __init__(  self ,   lowerCamelCase=5_0265 ,   lowerCamelCase=1024 ,   lowerCamelCase=12 ,   lowerCamelCase=16 ,   lowerCamelCase=4096 ,   lowerCamelCase="gelu" ,   lowerCamelCase=512 ,   lowerCamelCase=0.1 ,   lowerCamelCase=0.0 ,   lowerCamelCase=0.0 ,   lowerCamelCase=2 ,   lowerCamelCase=0.02 ,   lowerCamelCase=0.0 ,   lowerCamelCase=True ,   lowerCamelCase=False ,   lowerCamelCase=True ,   lowerCamelCase=True ,   lowerCamelCase=1 ,   lowerCamelCase=0 ,   lowerCamelCase=2 ,   **lowerCamelCase ,   )							->List[Any]:



         '''simple docstring'''
         __a				     =    vocab_size
         __a				     =    d_model
         __a				     =    decoder_layers
         __a				     =    decoder_attention_heads
         __a				     =    decoder_ffn_dim
         __a				     =    activation_function
         __a				     =    max_position_embeddings
         __a				     =    dropout
         __a				     =    attention_dropout
         __a				     =    activation_dropout
         __a				     =    init_std
         __a				     =    decoder_layerdrop
         __a				     =    use_cache
         __a				     =    scale_embedding
         __a				     =    use_learned_position_embeddings
         __a				     =    layernorm_embedding

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







'''simple docstring'''



import warnings

from .generation import TFGenerationMixin
class 							__SCREAMING_SNAKE_CASE       (							_lowerCAmelCase     ):
      # warning at import time
      warnings.warn(
          "Importing `TFGenerationMixin` from `src/transformers/generation_tf_utils.py` is deprecated and will "
          "be removed in Transformers v5. Import as `from transformers import TFGenerationMixin` instead."      ,      _lowerCAmelCase      ,      )