
'''simple docstring'''






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


UpperCAmelCase_							: Dict =							logging.get_logger(__name__)

UpperCAmelCase_							: Any =							{
    '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 			UpperCAmelCase__    (							A			):
    lowerCAmelCase_					     =		'trocr'
    lowerCAmelCase_					     =		['past_key_values']
    lowerCAmelCase_					     =		{
        'num_attention_heads': 'decoder_attention_heads',
        'hidden_size': 'd_model',
        'num_hidden_layers': 'decoder_layers',
    }



    def __init__(						self   :							List[Any],__A   :							int=5_0_2_6_5,__A   :							Union[str, Any]=1_0_2_4,__A   :							Any=1_2,__A   :							Any=1_6,__A   :							List[str]=4_0_9_6,__A   :							Tuple="gelu",__A   :							List[str]=5_1_2,__A   :							Tuple=0.1,__A   :							str=0.0,__A   :							Tuple=0.0,__A   :							List[Any]=2,__A   :							List[Any]=0.02,__A   :							Union[str, Any]=0.0,__A   :							Optional[int]=True,__A   :							List[Any]=False,__A   :							int=True,__A   :							Optional[int]=True,__A   :							List[str]=1,__A   :							Tuple=0,__A   :							Tuple=2,**__A   :							List[Any],):
          _lowerCamelCase					: Optional[Any]		    = vocab_size
          _lowerCamelCase					: str		    = d_model
          _lowerCamelCase					: Dict		    = decoder_layers
          _lowerCamelCase					: Dict		    = decoder_attention_heads
          _lowerCamelCase					: Union[str, Any]		    = decoder_ffn_dim
          _lowerCamelCase					: int		    = activation_function
          _lowerCamelCase					: Union[str, Any]		    = max_position_embeddings
          _lowerCamelCase					: Optional[int]		    = dropout
          _lowerCamelCase					: Any		    = attention_dropout
          _lowerCamelCase					: Tuple		    = activation_dropout
          _lowerCamelCase					: Dict		    = init_std
          _lowerCamelCase					: str		    = decoder_layerdrop
          _lowerCamelCase					: Optional[int]		    = use_cache
          _lowerCamelCase					: Any		    = scale_embedding
          _lowerCamelCase					: int		    = use_learned_position_embeddings
          _lowerCamelCase					: Optional[int]		    = layernorm_embedding

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

'''simple docstring'''

import warnings
from functools import wraps
from typing import Callable


def        UpperCAmelCase_ (  lowerCamelCase_			):







 """simple docstring"""


 @wraps(lowerCamelCase_			)
 def _inner_fn(*lowerCamelCase_      ,			**lowerCamelCase_			):
  warnings.warn(
      (f'''\'{fn.__name__}\' is experimental and might be subject to breaking changes in the future.''')      ,			lowerCamelCase_      ,			)
  return fn(*lowerCamelCase_      ,			**lowerCamelCase_			)

 return _inner_fn





