+
    œ°³j{I  ã                   ó‚  € R t ^ RIH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R7      ] ! R R]4      4       4       t]! RR7      ] ! R R]4      4       4       t. ROtR# )zFLAVA model configurations)ÚAny)Ústrict)ÚPreTrainedConfig)Úauto_docstringÚloggingzfacebook/flava-full)Ú
checkpointc                   ót   a € ] tR t^t o RtRtRtRt^t^t	Rt
RtRtRtRtR	t^àt^t^tR
tR
tRtV 3R ltRtV tR# )ÚFlavaImageConfiga$  
mask_token (`bool`, *optional*, defaults to `True`):
    Whether to use a mask token or not. Used in MIM (Masked Image Modeling) loss for FLAVA.

Example:

```python
>>> from transformers import FlavaImageConfig, FlavaImageModel

>>> # Initializing a FlavaImageModel with  style configuration
>>> configuration = FlavaImageConfig()

>>> # Initializing a FlavaImageModel model (with random weights) from the style configuration
>>> model = FlavaImageModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úflava_image_modelÚimage_configé   é   Úgeluç        ç{®Gáz”?çê-�™—q=Té    c                óz  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[;R&   S[;R	&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R
&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[ ;R&   S[;R&   S[;R&   S[ ;R&   # )é   Úhidden_sizeÚnum_hidden_layersÚnum_attention_headsÚintermediate_sizeÚ
hidden_actÚhidden_dropout_probÚattention_probs_dropout_probÚinitializer_rangeÚlayer_norm_epsÚ
image_sizeÚ
patch_sizeÚnum_channelsÚqkv_biasÚ
mask_tokenÚ
vocab_size)ÚintÚstrÚfloatÚlistÚtupleÚbool)ÚformatÚ__classdict__s   "€Ún/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/flava/configuration_flava.pyÚ__annotate__ÚFlavaImageConfig.__annotate__   s
  ø‡ ‚ ñ2 Ññ3 ñ4 Ññ5 ñ6 Ñ!ñ7 ñ8 Ñ!ñ9 ñ: Ññ; ñ< ¡�Ñ*ñ= ñ> #(©#¥+Ñ3ñ? ñ@ Ñ#ñA ñB Ñ!ñC ñD ‘d™3•i•¡%©©S¨¥/Õ1Ñ7ñE ñF ‘d™3•i•¡%©©S¨¥/Õ1Ñ6ñG ñH ÑñI ñJ ÑñK ñL ÑñM ñN ÑòO ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚbase_config_keyr   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r+   s   @r,   r	   r	      so   ø‡ € ñð& %€JØ$€Oà€KØÐØ!ÐØ!ÐØ€JØ'*ÐØ03Ð Ø#ÐØ!€NØ47€JØ46€JØ€LØ€HØ€JØ€J÷O ƒ r/   r	   c                   óp   a € ] tR t^Et o RtRtRtRt^tRt	Rt
^t^tRtRtR	tR	tR
tRt^ tRtV 3R ltRtV tR# )ÚFlavaTextConfigaŒ  
Example:

```python
>>> from transformers import FlavaTextConfig, FlavaTextModel

>>> # Initializing a FlavaTextModel with  style configuration
>>> configuration = FlavaTextConfig()

>>> # Initializing a FlavaTextModel model (with random weights) from the style configuration
>>> model = FlavaTextModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úflava_text_modelÚtext_configi:w  i   r   r   r   r   r   r   Tc                óð   <€ 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,          ;R&   S[;R&   # )r   r#   Útype_vocab_sizeÚmax_position_embeddingsr   r   r   r   r   r   r   r   r   NÚpad_token_idr!   ©r$   r%   r&   r)   )r*   r+   s   "€r,   r-   ÚFlavaTextConfig.__annotate__E   sÏ   ø‡ ‚ ñ, Ññ- ñ. Ññ/ ñ0 !Ñ&ñ1 ñ2 Ññ3 ñ4 Ññ5 ñ6 Ñ!ñ7 ñ8 Ñ!ñ9 ñ: Ññ; ñ< ¡�Ñ*ñ= ñ> #(©#¥+Ñ3ñ? ñ@ Ñ#ñA ñB Ñ!ñC ñD ˜•*Ñ ñE ñF ÑòG r/   r0   N)r1   r2   r3   r4   r5   r6   r7   r#   rA   rB   r   r   r   r   r   r   r   r   r   rC   r!   r8   r9   r:   r;   s   @r,   r=   r=   E   sk   ø‡ € ñð  $€JØ#€Oà€JØ€OØ#&ÐØ€KØÐØ!ÐØ!ÐØ€JØ'*ÐØ03Ð Ø#ÐØ!€NØ €LØ€H÷G ƒ r/   r=   c                   ód   a € ] tR t^kt o RtRtRtRt^t^t	Rt
RtRtRtRtR	tR
tR
tV 3R ltRtV tR# )ÚFlavaMultimodalConfigaK  
use_cls_token (`bool`, *optional*, defaults to `True`):
    Whether to use an extra CLS token for multimodal settings. Usually needed by the FLAVA model.

Example:

```python
>>> from transformers import FlavaMultimodalConfig, FlavaMultimodalModel

>>> # Initializing a FlavaMultimodalModel with  style configuration
>>> configuration = FlavaMultimodalConfig()

>>> # Initializing a FlavaMultimodalModel model (with random weights) from the style configuration
>>> model = FlavaMultimodalModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úflava_multimodal_modelÚmultimodal_configr   r   r   r   r   r   Tc                ó¾   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[S[ ,          ;R&   S[S[ ,          ;R&   S[;R&   S[;R	&   S[;R
&   S[;R&   # )r   r   r   r   r   r   r   r   r   r   r!   Úuse_cls_tokenrD   )r*   r+   s   "€r,   r-   Ú"FlavaMultimodalConfig.__annotate__k   s¤   ø‡ ‚ ñ2 Ññ3 ñ4 Ññ5 ñ6 Ñ!ñ7 ñ8 Ñ!ñ9 ñ: Ññ; ñ< ¡�Ñ*ñ= ñ> #(©#¥+Ñ3ñ? ñ@ Ñ#ñA ñB Ñ!ñC ñD ÑñE ñF ÑòG r/   r0   N)r1   r2   r3   r4   r5   r6   r7   r   r   r   r   r   r   r   r   r   r!   rK   r8   r9   r:   r;   s   @r,   rG   rG   k   s[   ø‡ € ñð& *€JØ)€Oà€KØÐØ!ÐØ!ÐØ€JØ'*ÐØ03Ð Ø#ÐØ!€NØ€HØ€M÷G ƒ r/   rG   c                   óL   a € ] tR t^‘t o Rt^t^t^tRtRt	Rt
RtV 3R ltRtV tR# )	ÚFlavaImageCodebookConfiga+  
num_groups (`int`, *optional*, defaults to 4):
    Number of groups to be created. This parameter as of now doesn't affect the model and is used for some
    internal calculation and estimations.
num_blocks_per_group (`int`, *optional*, defaults to 2):
    Number of conv-based blocks per group.
freeze (`bool`, defaults to `True`):
    Whether to freeze the weights of the model.

Example:

```python
>>> from transformers import FlavaImageCodebookConfig, FlavaImageCodebook

>>> # Initializing a FlavaImageCodebook with style configuration
>>> configuration = FlavaImageCodebookConfig()

>>> # Initializing a FlavaImageCodebook model (with random weights) from the style configuration
>>> model = FlavaImageCodebook(configuration)
>>> # Accessing the model configuration
>>> configuration = model.config
```
é   r   Tr   c                ón   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   # )r   Ú
num_groupsÚinput_channelsÚnum_blocks_per_groupr   r#   Úfreezer   )r$   r)   r&   )r*   r+   s   "€r,   r-   Ú%FlavaImageCodebookConfig.__annotate__‘   sd   ø‡ ‚ ñ6 Ññ7 ñ8 Ññ9 ñ: Ñ!ñ; ñ< Ññ= ñ> Ññ? ñ@ ÑñA ñB Ñ#òC r/   r0   N)r1   r2   r3   r4   r5   rQ   rR   rS   r   r#   rT   r   r8   r9   r:   r;   s   @r,   rN   rN   ‘   s9   ø‡ € ñð0 €JØ€NØ !ÐØ€KØ€JØ€FØ#Ð÷C ƒ r/   rN   c                   ó²   a a€ ] tR t^µt oRtRtR]R]R]R]	/t
RtRtRtRtRtR	tRtR
tRtRtRtRtRtRt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%# )ÚFlavaConfigaP	  
image_config (`dict`, *optional*):
    Dictionary of configuration options used to initialize [`FlavaImageConfig`].
multimodal_config (`dict`, *optional*):
    Dictionary of configuration options used to initialize [`FlavaMultimodalConfig`].
image_codebook_config (`dict`, *optional*):
    Dictionary of configuration options used to initialize [`FlavaCodebookConfig`].
init_codebook (`bool`, *optional*, defaults to `True`):
    Whether to initialize the codebook
logit_scale_init_value (`float`, *optional*, defaults to 2.6592):
    The initial value of the *logit_scale* parameter. Default is used as per the original FLAVA/CLIP
    implementation.
ce_ignore_index (`int`, *optional*, defaults to -100):
    Cross entropy index to ignore.
mim_weight (`float`, *optional*, defaults to 1.0):
    Weight to be assigned to MIM (Masked Image Modeling) unimodal loss
mlm_weight (`float`, *optional*, defaults to 1.0):
    Weight to be assigned to MLM (Masked Language Modeling) unimodal loss
global_contrastive_weight (`float`, *optional*, defaults to 1.0):
    Weight to be assigned to global contrastive cross-alignment loss.
itm_weight (`float`, *optional*, defaults to 1.0):
    Weight to be assigned to image-text matching multimodal loss.
mmm_image_weight (`float`, *optional*, defaults to 1.0):
    Weight to be assigned to MMM loss's image part.
mmm_text_weight (`float`, *optional*, defaults to 1.0):
    Weight to be assigned to MMM loss's text part.
global_backprop_contrastive (`bool`, *optional*, defaults to `True`):
    Whether to use global backpropgation through all workers in contrastive loss.
skip_unmasked_multimodal_encoder (`bool`, *optional*, defaults to `True`):
    Whether to skip running unmasked multimodal encoder whose outputs are not used by FLAVA losses.
return_loss (`bool`, *optional*, defaults to `True`):
    Whether to return loss or not

Example:

```python
>>> from transformers import FlavaConfig, FlavaModel, FlavaForPreTraining

>>> # Initializing a FlavaConfig with style configuration
>>> configuration = FlavaConfig()

>>> # Initializing a FlavaModel and FlavaForPreTraining model (with random weights) from the style configuration
>>> model = FlavaModel(configuration)
>>> model_pre = FlavaForPreTraining(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
>>> configuration_pre = model_pre.config
```
Úflavar?   r   rI   Úimage_codebook_configNr   r   Tgƒ/L¦
F@r   g      ð?c                óº	  <€ V P                   f   / p\        P                  R4       MG\        V P                   \        4      '       d   V P                   P                  4       pMV P                   pV P                  f   / p\        P                  R4       MG\        V P                  \        4      '       d   V P                  P                  4       pMV P                  pV P                  f   / p\        P                  R4       MG\        V P                  \        4      '       d   V P                  P                  4       pMV P                  pV P                  f   / p\        P                  R4       MG\        V P                  \        4      '       d   V P                  P                  4       pMV P                  pVP                  RR 4      pVP                  RR 4      pVP                  RR 4      pVP                  RR 4      p	Ve�   \	        R/ VB P                  4       p
V
P                  4        FP  w  r¼W²9   g   K  WÂV,          8w  g   K  VR	8w  g   K%  W¶9   d   R
V RV R2pMRV R2p\        P                  V4       KR  	  VP                  V
4       VeÎ   \        R/ VB P                  4       pRV9   d9   VR,          P                  4        UUu/ uF  w  r¼\        V4      VbK  	  uppVR&   VP                  4        FP  w  r¼W³9   g   K  WÃV,          8w  g   K  VR	8w  g   K%  W·9   d   R
V RV R2pMRV R2p\        P                  V4       KR  	  VP                  V4       Ve�   \        R/ VB P                  4       pVP                  4        FP  w  r¼W´9   g   K  WÄV,          8w  g   K  VR	8w  g   K%  W¸9   d   R
V RV R2pMRV R2p\        P                  V4       KR  	  VP                  V4       V	e�   \        R/ V	B P                  4       pVP                  4        FP  w  r¼Wµ9   g   K  WÅV,          8w  g   K  VR	8w  g   K%  W¹9   d   R
V RV R2pMRV R2p\        P                  V4       KR  	  VP                  V4       \	        R/ VB V n         \        R/ VB V n        \        R/ VB V n        \        R/ VB V n
        \         SV `D  ! R/ VB  R # u uppi )NzP`text_config` is `None`. Initializing the `FlavaTextConfig` with default values.zR`image_config` is `None`. initializing the `FlavaImageConfig` with default values.z\`multimodal_config` is `None`. Initializing the `FlavaMultimodalConfig` with default values.zc`image_codebook_config` is `None`. initializing the `FlavaImageCodebookConfig` with default values.Útext_config_dictÚimage_config_dictÚmultimodal_config_dictÚimage_codebook_config_dictÚtransformers_versionÚ`zp` is found in both `text_config_dict` and `text_config` but with different values. The value `text_config_dict["z"]` will be used instead.zk`text_config_dict` is provided which will be used to initialize `FlavaTextConfig`. The value `text_config["z"]` will be overridden.Úid2labelzs` is found in both `image_config_dict` and `image_config` but with different values. The value `image_config_dict["zn`image_config_dict` is provided which will be used to initialize `FlavaImageConfig`. The value `image_config["z‚` is found in both `multimodal_config_dict` and `multimodal_config` but with different values. The value `multimodal_config_dict["z}`multimodal_config_dict` is provided which will be used to initialize `FlavaMultimodalConfig`. The value `multimodal_config["zŽ` is found in both `image_codebook_config_dict` and `image_codebook_config` but with different values. The value `image_codebook_config_dict["zˆ`image_codebook_config_dict` is provided which will be used to initialize `FlavaImageCodebookConfig`. The value `image_codebook_config["r0   )r?   ÚloggerÚinfoÚ
isinstancer=   Úto_dictr   r	   rI   rG   rY   rN   ÚpopÚitemsÚupdater%   ÚsuperÚ__post_init__)ÚselfÚkwargsr?   r   rI   rY   r[   r\   r]   r^   Ú_text_config_dictÚkeyÚvalueÚmessageÚ_image_config_dictÚ_multimodal_config_dictÚ_image_codebook_config_dictÚ	__class__s   &,               €r,   rj   ÚFlavaConfig.__post_init__
  sì  ø€ Ø×ÑÒ#ØˆKÜ�K‰KÐjÕkÜ˜×(Ñ(¬/×:Ò:Ø×*Ñ*×2Ñ2Ó4‰Kà×*Ñ*ˆKà×ÑÒ$ØˆLÜ�K‰KÐlÕmÜ˜×)Ñ)Ô+;×<Ò<Ø×,Ñ,×4Ñ4Ó6‰Là×,Ñ,ˆLà×!Ñ!Ò)Ø "ÐÜ�K‰KÐvÕwÜ˜×.Ñ.Ô0E×FÒFØ $× 6Ñ 6× >Ñ >Ó @Ñà $× 6Ñ 6Ðà×%Ñ%Ò-Ø$&Ð!Ü�K‰KØuõô ˜×2Ñ2Ô4L×MÒMØ$(×$>Ñ$>×$FÑ$FÓ$HÑ!à$(×$>Ñ$>Ð!ð "Ÿ:™:Ð&8¸$Ó?ÐØ"ŸJ™JÐ':¸DÓAÐØ!'§¡Ð,DÀdÓ!KÐØ%+§Z¡ZÐ0LÈdÓ%SÐ"ð
 Ò'ä /Ñ CÐ2BÑ C× KÑ KÓ MÐð 0×5Ñ5Ö7‘
�ØÖ%¨%¸sÕ3CÖ*CÈÐOeÖHeàÔ.à ˜uð %<Ø<?¸5Ð@Yð[ñ  ð3Ø36°%Ð7NðPð  ô —K‘K Ö(ñ 8ð" ×ÑÐ0Ô1àÒ(ä!1Ñ!FÐ4EÑ!F×!NÑ!NÓ!PÐàÐ/Ô/à6HÈÕ6T×6ZÑ6ZÔ6\ô2Ù6\©
¨”C˜“H˜e’OÑ6\ò2Ð" :Ñ.ð
 1×6Ñ6Ö8‘
�ØÖ&¨5ÀÕ4EÖ+EÈ#ÐQgÖJgàÔ/à ˜uð %EØEHÀEÐIbðdñ  ð8Ø8;°uÐ<SðUð  ô —K‘K Ö(ñ 9ð" ×ÑÐ 2Ô3à!Ò-ä&;Ñ&UÐ>TÑ&U×&]Ñ&]Ó&_Ð#ð 6×;Ñ;Ö=‘
�ØÖ+°È3Õ9OÖ0OÐTWÐ[qÖTqàÔ4à ˜uð %TØTWÐSXÐXqðsñ  ðVØVYÐUZÐZqðsð  ô —K‘K Ö(ñ >ð" ×$Ñ$Ð%<Ô=à%Ò1ä*BÑ*`ÐE_Ñ*`×*hÑ*hÓ*jÐ'ð :×?Ñ?ÖA‘
�àÖ0Ø°sÕ!;Ö;ØÐ5Ö5ð Ô8à ˜uð %]Ø]`Ð\að b'ð'ñ  ð]Ø]`Ð\aÐaxðzð  ô —K‘K Ö(ñ' Bð, "×(Ñ(Ð)DÔEô +Ñ9¨[Ñ9ˆÔÜ,Ñ<¨|Ñ<ˆÔÜ!6Ñ!KÐ9JÑ!KˆÔÜ%=Ñ%VÐ@UÑ%VˆÔ"ä‰ÒÑ' Ô'ùók2s   ËSc                óò  <€ V ^8„  d   Qh/ S[ S[S[3,          S[,          R,          ;R&   S[ S[S[3,          S[,          R,          ;R&   S[ S[S[3,          S[,          R,          ;R&   S[ S[S[3,          S[,          R,          ;R&   S[;R&   S[;R&   S[;R&   S[;R	&   S[;R
&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )r   Nr   r?   rI   rY   r   r   Úprojection_dimÚinit_codebookÚlogit_scale_init_valuer   Úce_ignore_indexÚ
mim_weightÚ
mlm_weightÚglobal_contrastive_weightÚ
itm_weightÚmmm_image_weightÚmmm_text_weightÚglobal_backprop_contrastiveÚ skip_unmasked_multimodal_encoderÚreturn_lossÚtie_word_embeddingsÚinitializer_factor)Údictr%   r   r   r$   r&   r)   )r*   r+   s   "€r,   r-   ÚFlavaConfig.__annotate__µ   s›  ø‡ ‚ ñ| ‘s™C�x•.Ñ#3Õ3°dÕ:ÑAñ} ñ~ ‘c™3�h•Ñ"2Õ2°TÕ9Ñ@ñ ñ@ ™C¡˜H•~Ñ(8Õ8¸4Õ?ÑFñA ñB  ¡¡S �>Ñ,<Õ<¸tÕCÑJñC ñD ÑñE ñF Ñ!ñG ñH ÑñI ñJ ÑñK ñL "Ñ*ñM ñN Ñ#ñO ñP ÑñQ ñR ÑñS ñT ÑñU ñV  %Ñ*ñW ñX ÑñY ñZ Ñ!ñ[ ñ\ Ñ ñ] ñ^ "&Ñ,ñ_ ñ` '+Ñ1ña ñb Ññc ñd Ñ$ñe ñf Ñ#òg r/   )rY   r   rI   r?   iœÿÿÿ)&r1   r2   r3   r4   r5   r6   r=   r	   rG   rN   Úsub_configsr   r?   rI   rY   r   r   rw   rx   ry   r   rz   r{   r|   r}   r~   r   r€   r�   r‚   rƒ   r„   r…   rj   r8   r9   r:   Ú__classcell__)rt   r+   s   @@r,   rW   rW   µ   s¹   ù‡ € ñ1ðf €Jà�ØÐ(ØÐ2ØÐ!9ð	€Kð >B€LØ<@€KØBFÐØFJÐØ€KØ!€NØ€NØ€MØ$*ÐØ#ÐØ€OØ€JØ€JØ'*ÐØ€JØ!ÐØ €OØ(,ÐØ-1Ð$Ø€KØ $ÐØ #Ðõ^(÷k … r/   rW   N)rW   rN   r	   rG   r=   )r5   Útypingr   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Ú
get_loggerr1   rb   r	   r=   rG   rN   rW   Ú__all__r0   r/   r,   Ú<module>r�      s
  ðñ !å å .å 3ß ,ð 
×	Ò	˜HÓ	%€ñ Ð0Ô1Øô%Ð'ó %ó ó 2ð%ñP Ð0Ô1Øô!Ð&ó !ó ó 2ð!ñH Ð0Ô1Øô!Ð,ó !ó ó 2ð!ñH Ð0Ô1Øô$Ð/ó $ó ó 2ð$ñD Ð0Ô1Øôq(Ð"ó q(ó ó 2ðq(òh v‚r/   