
    i
                     j    d Z ddlmZ ddlmZ ddlmZ  ed      e G d d	e                    Zd	gZy
)zTrOCR model configuration    )strict   )PreTrainedConfig)auto_docstringz microsoft/trocr-base-handwritten)
checkpointc                      e Zd ZU dZdZdgZddddZdZee	d	<   d
Z
ee	d<   dZee	d<   dZee	d<   dZee	d<   dZee	d<   dZee	d<   dZeez  e	d<   dZeez  e	d<   dZeez  e	d<   dZee	d<   dZee	d<   dZeez  e	d<   dZee	d<   dZee	d <   dZee	d!<   dZee	d"<   d#Zed$z  e	d%<   d&Zed$z  e	d'<   dZee e   z  d$z  e	d(<   d$Z!ed$z  e	d)<   dZ"ee	d*<   dZ#ee	d+<   y$),TrOCRConfiga  
    use_learned_position_embeddings (`bool`, *optional*, defaults to `True`):
        Whether or not to use learned position embeddings. If not, sinusoidal position embeddings will be used.
    layernorm_embedding (`bool`, *optional*, defaults to `True`):
        Whether or not to use a layernorm after the word + position embeddings.

    Example:

    ```python
    >>> from transformers import TrOCRConfig, TrOCRForCausalLM

    >>> # Initializing a TrOCR-base style configuration
    >>> configuration = TrOCRConfig()

    >>> # Initializing a model (with random weights) from the TrOCR-base style configuration
    >>> model = TrOCRForCausalLM(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```trocrpast_key_valuesdecoder_attention_headsd_modeldecoder_layers)num_attention_headshidden_sizenum_hidden_layersiY  
vocab_sizei         i   decoder_ffn_dimgeluactivation_functioni   max_position_embeddingsg?dropoutg        attention_dropoutactivation_dropout   decoder_start_token_idg{Gz?init_stddecoder_layerdropT	use_cacheFscale_embeddinguse_learned_position_embeddingslayernorm_embedding   Npad_token_idr   bos_token_ideos_token_idcross_attention_hidden_size
is_decodertie_word_embeddings)$__name__
__module____qualname____doc__
model_typekeys_to_ignore_at_inferenceattribute_mapr   int__annotations__r   r   r   r   r   strr   r   floatr   r   r   r   r   r    boolr!   r"   r#   r%   r&   r'   listr(   r)   r*        ~/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/trocr/configuration_trocr.pyr	   r	      sC   * J#4"58 -M JGSNC#%S%OS%%#&S&GUS[%(us{(&))"#C#He%(us{(It!OT!,0#T0 $$ L#*  L#* +,L#S	/D(,.2t2J $$r9   r	   N)	r.   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r8   r9   r:   <module>r?      sG      . 3 # =>4%" 4%  ?4%n /r9   