+
    œ°³j£   ã                   ó  € R t ^ RIHt ^RIHt ^RIHtHt ]P                  ! ]	4      t
]! RR7      ] ! R R]4      4       4       t]! RR7      ] ! R R	]4      4       4       t]! RR7      ] ! R
 R]4      4       4       t. ROtR# )zPix2Struct model configuration)Ústrict)ÚPreTrainedConfig)Úauto_docstringÚloggingzgoogle/pix2struct-base)Ú
checkpointc                   óª   a € ] tR t^t o RtRtR.tRRRRRRR	RR
RRRRR/tRtRt	^@t
Rt^t^t^ t^€tRtRtRtRt^ tRt^ t^tRtRtRtRtV 3R ltRtV tR# )ÚPix2StructTextConfigan  
relative_attention_num_buckets (`int`, *optional*, defaults to 32):
    The number of buckets to use for each attention layer.
relative_attention_max_distance (`int`, *optional*, defaults to 128):
    The maximum distance of the longer sequences for the bucket separation.
dense_act_fn (`Union[Callable, str]`, *optional*, defaults to `"gelu_new"`):
    The non-linear activation function (function or string).

Example:

```python
>>> from transformers import Pix2StructTextConfig, Pix2StructTextModel

>>> # Initializing a Pix2StructTextConfig with google/pix2struct-base style configuration
>>> configuration = Pix2StructTextConfig()

>>> # Initializing a Pix2StructTextModel (with random weights) from the google/pix2struct-base style configuration
>>> model = Pix2StructTextModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úpix2struct_text_modelÚpast_key_valuesÚhidden_sizeÚnum_attention_headsÚ	num_headsÚnum_hidden_layersÚ
num_layersÚdecoder_attention_headsÚencoder_attention_headsÚencoder_layersÚdecoder_layersiDÄ  é   é   gš™™™™™¹?ç�íµ ÷Æ°>ç      ð?Úgelu_newFNTc                ód  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[S[ ,          ;R	&   S[;R
&   S[;R&   S[;R&   S[ ;R&   S[;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[ R,          ;R&   S[;R&   S[;R&   S[;R&   # )é   Ú
vocab_sizer   Úd_kvÚd_ffr   r   Úrelative_attention_num_bucketsÚrelative_attention_max_distanceÚdropout_rateÚlayer_norm_epsilonÚinitializer_factorÚdense_act_fnÚdecoder_start_token_idÚ	use_cacheNÚpad_token_idÚeos_token_idÚbos_token_idÚtie_word_embeddingsÚ
is_decoderÚadd_cross_attention)ÚintÚfloatÚstrÚboolÚlist)ÚformatÚ__classdict__s   "€Úx/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/pix2struct/configuration_pix2struct.pyÚ__annotate__Ú!Pix2StructTextConfig.__annotate__   sI  ø‡ ‚ ñL ÑñM ñN ÑñO ñP �NñQ ñR ÑñS ñT ÑñU ñV ÑñW ñX %(Ñ,ñY ñZ &)Ñ.ñ[ ñ\ ™#•+Ñ#ñ] ñ^ Ñ$ñ_ ñ` Ñ#ña ñb Ñ"ñc ñd  Ñ#ñe ñf Ññg ñh ˜•*Ñ ñi ñj ™™S�	•/ DÕ(Ñ,ñk ñl ˜•*Ñ#ñm ñn Ñ%ño ñp Ññq ñr Ñ%òs ó    © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚkeys_to_ignore_at_inferenceÚattribute_mapr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r2   s   @r3   r   r      s¹   ø‡ € ñð. )€JØ#4Ð"5Ðà�}Ø˜{Ø˜\Ø! ;Ø! ;Ø˜,Ø˜,ð€Mð €JØ€KØ€DØ€DØ€JØ€IØ*,Ð"Ø+.Ð#Ø #€LØ $ÐØ #ÐØ"€LØ"#ÐØ€IØ €LØ+,€LØ#€LØ %ÐØ€JØ %Ð÷s ƒ r6   r   c                   óp   a € ] tR t^Ut o RtRtRtRtRt^@t	^t
^tRtRtRtRtRtR	tR
t^ t^€tV 3R ltRtV tR# )ÚPix2StructVisionConfiga*  
patch_embed_hidden_size (`int`, *optional*, defaults to 768):
    Dimensionality of the input patch_embedding layer in the Transformer encoder.
d_ff (`int`, *optional*, defaults to 2048):
    Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
d_kv (`int`, *optional*, defaults to 64):
    Dimensionality of the key, query, value projections per attention head.
The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
    `"relu"`, `"selu"` and `"gelu_new"` `"gelu"` are supported.
dense_act_fn (`Union[Callable, str]`, *optional*, defaults to `"gelu_new"`):
    The non-linear activation function (function or string).
seq_len (`int`, *optional*, defaults to 4096):
    Maximum sequence length (here number of patches) supported by the model.
relative_attention_num_buckets (`int`, *optional*, defaults to 32):
    The number of buckets to use for each attention layer.
relative_attention_max_distance (`int`, *optional*, defaults to 128):
    The maximum distance (in tokens) to use for each attention layer.

Example:

```python
>>> from transformers import Pix2StructVisionConfig, Pix2StructVisionModel

>>> # Initializing a Pix2StructVisionConfig with google/pix2struct-base style configuration
>>> configuration = Pix2StructVisionConfig()

>>> # Initializing a Pix2StructVisionModel (with random weights) from the google/pix2struct-base style configuration
>>> model = Pix2StructVisionModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úpix2struct_vision_modelr   r   r   r   g        g»½×Ùß|Û=r   i   c                óî   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[S[ ,          ;R	&   S[S[ ,          ;R
&   S[;R&   S[;R&   S[ ;R&   S[ ;R&   S[ ;R&   # )r   r   Úpatch_embed_hidden_sizer   r   r   r   r#   Úlayer_norm_epsr    Úattention_dropoutÚinitializer_ranger"   Úseq_lenr   r   )r,   r.   r-   )r1   r2   s   "€r3   r4   Ú#Pix2StructVisionConfig.__annotate__U   sí   ø‡ ‚ ñL ÑñM ñN !Ñ&ñO ñP ÑñQ ñR �NñS ñT ÑñU ñV Ñ!ñW ñX Ñ"ñY ñZ Ñ ñ[ ñ\ ™#•+Ñ#ñ] ñ^ ™s•{Ñ(ñ_ ñ` Ñ$ña ñb Ñ#ñc ñd Ññe ñf %(Ñ,ñg ñh &)Ñ.òi r6   r7   N)r8   r9   r:   r;   r<   r=   r   rH   r   r   r   r   r#   rI   r    rJ   rK   r"   rL   r   r   r@   rA   rB   rC   s   @r3   rE   rE   U   sm   ø‡ € ñðB +€Jà€KØ#&ÐØ€DØ€DØÐØ!ÐØ"€LØ €NØ #€LØ%(ÐØ$ÐØ #ÐØ€GØ*,Ð"Ø+.Ð#÷i ƒ r6   rE   c                   ón   a a€ ] tR t^Œt oRtRtR]R]/tRt	Rt
RtRtRtRtR	tV 3R
 ltV3R ltRtVtV ;t# )ÚPix2StructConfiga¿  
is_vqa (`bool`, *optional*, defaults to `False`):
    Whether the model has been fine-tuned for VQA or not.

Example:

```python
>>> from transformers import Pix2StructConfig, Pix2StructForConditionalGeneration

>>> # Initializing a Pix2StructConfig with google/pix2struct-base style configuration
>>> configuration = Pix2StructConfig()

>>> # Initializing a Pix2StructForConditionalGeneration (with random weights) from the google/pix2struct-base style configuration
>>> model = Pix2StructForConditionalGeneration(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config

>>> # We can also initialize a Pix2StructConfig from a Pix2StructTextConfig and a Pix2StructVisionConfig

>>> # Initializing a Pix2Struct text and Pix2Struct vision configuration
>>> config_text = Pix2StructTextConfig()
>>> config_vision = Pix2StructVisionConfig()

>>> config = Pix2StructConfig(text_config=config_text, vision_config=config_vision)
```Ú
pix2structÚtext_configÚvision_configNr   g{®Gáz”?FTc                ó|  <€ V P                   f=   \        V P                  V P                  R7      V n         \        P                  R4       Ml\        V P                   \        4      '       dM   V P                  V P                   R&   V P                  V P                   R&   \        R/ V P                   B V n         V P                  f&   \        4       V n        \        P                  R4       M:\        V P                  \        4      '       d   \        R/ V P                  B V n        V P                   P                  V n
        V P                   P                  V n        V P                   P                  V n        V P                  V P                   n        V P                  V P                  n        \        SV `<  ! R/ VB  R # )N)Úis_encoder_decoderr)   zU`text_config` is `None`. initializing the `Pix2StructTextConfig` with default values.rT   r)   zY`vision_config` is `None`. initializing the `Pix2StructVisionConfig` with default values.r7   )rQ   r   rT   r)   ÚloggerÚinfoÚ
isinstanceÚdictrR   rE   r$   r&   r'   rK   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s   &,€r3   rZ   ÚPix2StructConfig.__post_init__µ   sU  ø€ Ø×ÑÒ#Ü3Ø#'×#:Ñ#:Ø$(×$<Ñ$<ô ˆDÔô �K‰KÐoÕpÜ˜×(Ñ(¬$×/Ò/Ø59×5LÑ5LˆD×ÑÐ1Ñ2Ø6:×6NÑ6NˆD×ÑÐ2Ñ3Ü3ÑG°d×6FÑ6FÑGˆDÔà×ÑÒ%Ü!7Ó!9ˆDÔÜ�K‰KÐsÕtÜ˜×*Ñ*¬D×1Ò1Ü!7Ñ!M¸$×:LÑ:LÑ!MˆDÔà&*×&6Ñ&6×&MÑ&MˆÔ#Ø ×,Ñ,×9Ñ9ˆÔØ ×,Ñ,×9Ñ9ˆÔà-1×-CÑ-Cˆ×ÑÔ*Ø/3×/EÑ/Eˆ×ÑÔ,ä‰ÒÑ' Ô'r6   c                óª   <€ V ^8„  d   Qh/ S[ S[,          R,          ;R&   S[ S[,          R,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )	r   NrQ   rR   r"   rK   Úis_vqar)   rT   )rX   r   r-   r/   )r1   r2   s   "€r3   r4   ÚPix2StructConfig.__annotate__Œ   s„   ø‡ ‚ ñB Ñ(Õ(¨4Õ/Ñ6ñC ñD Ñ*Õ*¨TÕ1Ñ8ñE ñF Ñ#ñG ñH Ñ#ñI ñJ ÑñK ñL Ñ%ñM ñN Ñ#òO r6   )r$   r'   r&   rQ   rR   )r8   r9   r:   r;   r<   r=   r   rE   Úsub_configsrQ   rR   r"   rK   r`   r)   rT   rZ   r@   rA   rB   Ú__classcell__)r]   r2   s   @@r3   rO   rO   Œ   sU   ù‡ € ñð6 €JØ Ð"6¸ÐI_Ð`€Kà26€KØ48€MØ #ÐØ#ÐØ€FØ %ÐØ#Ðõ(÷S … r6   rO   N)rO   r   rE   )r<   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Ú
get_loggerr8   rU   r   rE   rO   Ú__all__r7   r6   r3   Ú<module>ri      s±   ðñ %å .å 3ß ,ð 
×	Ò	˜HÓ	%€ñ Ð3Ô4Øô7&Ð+ó 7&ó ó 5ð7&ñt Ð3Ô4Øô2/Ð-ó 2/ó ó 5ð2/ñj Ð3Ô4Øô@(Ð'ó @(ó ó 5ð@(òF Q‚r6   