+
    œ°³jŽ  ã                   óÞ   € R t ^ RIHt ^RIHt ^RIH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Idefics model configuration)Ústrict)ÚPreTrainedConfig)Úauto_docstringzHuggingFaceM4/idefics-9b)Ú
checkpointc                   óh   a € ] tR t^t o RtRR/tRt^àtRt^t	^ t
^t^tRtRtRtR	tR
tV 3R ltRtV tR# )ÚIdeficsVisionConfigÚidefics_visionÚhidden_sizeÚ	embed_dimi   i   Úgelugñhãˆµøä>ç        ç{®Gáz”?g      ð?c                óF  <€ V ^8„  d   Qh/ S[ ;R&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[ ;R&   S[ S[S[ ,          ,          S[S[ S[ 3,          ,          ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R	&   S[S[ ,          ;R
&   S[;R&   S[;R&   # )é   r
   Ú
image_sizeÚintermediate_sizeÚ
patch_sizeÚnum_hidden_layersÚnum_attention_headsÚnum_channelsÚ
hidden_actÚlayer_norm_epsÚattention_dropoutÚinitializer_rangeÚinitializer_factor)ÚintÚlistÚtupleÚstrÚfloat)ÚformatÚ__classdict__s   "€Úr/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/idefics/configuration_idefics.pyÚ__annotate__Ú IdeficsVisionConfig.__annotate__   sÏ   ø‡ ‚ ñ Ññ ñ ‘d™3•i•¡%©©S¨¥/Õ1Ñ7ñ ñ Ñ!ñ ñ ‘d™3•i•¡%©©S¨¥/Õ1Ñ6ñ ñ Ññ ñ Ñ!ñ ñ Ññ ñ Ññ ñ Ñ ñ ñ ™s•{Ñ(ñ ñ  Ñ#ñ! ñ" Ñ#ò# ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú
model_typeÚattribute_mapr
   r   r   r   r   r   r   r   r   r   r   r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r!   s   @r"   r   r      s_   ø‡ € ð "€JØ" KÐ0€Mà€IØ47€JØ!ÐØ46€JØÐØ!ÐØ€LØ€JØ €NØ%(ÐØ#ÐØ #Ð÷# ƒ r%   r   c                   óL   a € ] tR t^/t o RtRtRt^@t^t^t	^`t
RtV 3R ltRtV tR# )ÚIdeficsPerceiverConfiga  
use_resampler (`bool`, *optional*, defaults to `False`):
    Whether or not to use the resampler
resampler_n_latents (`int`, *optional*, defaults to 64):
    Number of latent embeddings to resample ("compress") the input sequence to (usually < 128).
resampler_depth (`int`, *optional*, defaults to 6):
    Depth of the Perceiver Resampler (Transformer w/ cross attention). Should be shallow (< 3).
resampler_n_heads (`int`, *optional*, defaults to 16):
    Number of heads in each Transformer block (for multi-headed self-attention).
resampler_head_dim (`int`, *optional*, defaults to 96):
    Dimensionality of each head projection in the Transformer block.
qk_layer_norms_perceiver (`bool`, *optional*, defaults to `False`):
    Whether or not to use qk layer norms in perceiver
Úidefics_percieverFc                ób   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[ ;R&   # )r   Úuse_resamplerÚresampler_n_latentsÚresampler_depthÚresampler_n_headsÚresampler_head_dimÚqk_layer_norms_perceiver)Úboolr   )r    r!   s   "€r"   r#   Ú#IdeficsPerceiverConfig.__annotate__/   sS   ø‡ ‚ ñ( Ññ) ñ* Ñ!ñ+ ñ, Ññ- ñ. Ññ/ ñ0 Ñ ñ1 ñ2 #Ñ*ò3 r%   r&   N)r'   r(   r)   r*   Ú__doc__r+   r5   r6   r7   r8   r9   r:   r-   r.   r/   r0   s   @r"   r2   r2   /   s:   ø‡ € ñð %€Jà€MØ!ÐØ€OØÐØ ÐØ%*Ð÷3 ƒ r%   r2   c                   óÊ   a a€ ] tR t^Kt oRtRtR]R]/tRt	^ t
RtRt^ t^ tRtR	tR
tRtRtRtRtRt^ t^t^tRt^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+# )ÚIdeficsConfigaÐ  
additional_vocab_size (`int`, *optional*, defaults to 0):
    Additional vocabulary size of the model, typically for the special "<img>" token. Additional vocab tokens
    are always trainable whereas regular vocab tokens can be frozen or not.
alpha_initializer (`str`, *optional*, defaults to `"zeros"`):
    Initialization type for the alphas.
alphas_initializer_range (`float`, *optional*, defaults to 0.0):
    The standard deviation of the truncated_normal_initializer for initializing the alphas in the Gated Cross
    Attention.
alpha_type (`str`, *optional*, defaults to `"float"`):
    Whether the gating alphas should be vectors or single floats.
cross_layer_interval (`int`, *optional*, default to 1):
    Interval for cross attention (from text to image) layers.
qk_layer_norms (`bool`, *optional*, defaults to `False`):
    Whether to add layer norm after q and k
freeze_text_layers (`bool`, *optional*, defaults to `True`):
    Whether to freeze text layers
freeze_text_module_exceptions (`bool`, *optional*, defaults to `[]`):
    Exceptions to freezing text layers when `freeze_text_layers` is `True`
freeze_lm_head (`bool`, *optional*, defaults to `False`):
    Whether to freeze lm head
freeze_vision_layers (`bool`, *optional*, defaults to `True`):
    Whether to freeze vision layers
freeze_vision_module_exceptions (`bool`, *optional*, defaults to `[]`):
    Exceptions to freezing vision layers when `freeze_vision_layers` is `True`
use_resampler (`bool`, *optional*, defaults to `False`):
    Whether to use the Resampler
perceiver_config (`IdeficsPerceiverConfig`,  *optional*):
    Custom perceiver config or dict

Example:

```python
>>> from transformers import IdeficsModel, IdeficsConfig

>>> # Initializing a Idefics idefics-9b style configuration
>>> configuration = IdeficsConfig()

>>> # Initializing a model from the idefics-9b style configuration
>>> model = IdeficsModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```ÚideficsÚperceiver_configÚvision_configi }  i   i +  r   Úsilur   Úzerosr   g�íµ ÷Æ°>TFNi   c                óˆ  <€ V P                   f   \        4       V n         M:\        V P                   \        4      '       d   \        R/ V P                   B V n         V P                  f   \        4       V n        M:\        V P                  \        4      '       d   \        R/ V P                  B V n        \        SV `  ! R/ VB  R # )Nr&   )rA   r2   Ú
isinstanceÚdictrB   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s   &,€r"   rI   ÚIdeficsConfig.__post_init__�   s“   ø€ Ø× Ñ Ò(Ü$:Ó$<ˆDÕ!Ü˜×-Ñ-¬t×4Ò4Ü$:Ñ$S¸T×=RÑ=RÑ$SˆDÔ!à×ÑÒ%Ü!4Ó!6ˆDÕÜ˜×*Ñ*¬D×1Ò1Ü!4Ñ!J°t×7IÑ7IÑ!JˆDÔä‰ÒÑ' Ô'r%   c                óF  <€ V ^8„  d   Qh/ 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&   S[;R&   S[ R,          ;R&   S[ R,          ;R&   S[ S[S[ ,          ,          R,          ;R&   S[;R&   S[ ;R&   S[;R&   S[;R&   S[S[,          ;R&   S[;R&   S[;R&   S[S[,          ;R&   S[;R&   S[S[,          R,          ;R&   S[ ;R&   S[S[,          R,          ;R&   S[R,          ;R&   # ) r   Ú
vocab_sizeÚadditional_vocab_sizer	   r   r   r   Údropoutr   r   Úalpha_initializerÚalphas_initializer_rangeÚ
alpha_typeÚrms_norm_epsÚ	use_cacheNÚpad_token_idÚbos_token_idÚeos_token_idÚtie_word_embeddingsÚcross_layer_intervalÚqk_layer_normsÚfreeze_text_layersÚfreeze_text_module_exceptionsÚfreeze_lm_headÚfreeze_vision_layersÚfreeze_vision_module_exceptionsr5   rB   Úmax_position_embeddingsrA   Úrope_parameters)r   r   r   r;   r   r   rG   r   )r    r!   s   "€r"   r#   ÚIdeficsConfig.__annotate__K   s  ø‡ ‚ ñf Ññg ñh Ñ"ñi ñj Ññk ñl Ñ"ñm ñn Ñño ñp Ñ!ñq ñr ‘S�[Ññs ñt Ññu ñv Ñ#ñw ñx Ñ$ñy ñz $Ñ)ñ{ ñ| Ññ} ñ~ Ññ ñ@ ÑñA ñB ˜•*Ñ ñC ñD ˜•*Ñ ñE ñF ™™S�	•/ DÕ(Ñ,ñG ñH Ñ%ñI ñJ Ñ!ñK ñL Ñ ñM ñN Ñ#ñO ñP $(©%¥<Ñ4ñQ ñR Ñ ñS ñT Ñ%ñU ñV &*©E¥\Ñ6ñW ñX ÑñY ñZ Ñ*Õ*¨TÕ1Ñ8ñ[ ñ\ !Ñ'ñ] ñ^ Ñ-Õ-°Õ4Ñ;ñ_ ñ` ˜D•[Ñ'òa r%   )rA   rB   r&   ),r'   r(   r)   r*   r=   r+   r2   r   Úsub_configsrO   rP   r	   r   r   r   rQ   r   r   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   r5   rB   rb   rA   rc   rI   r-   r.   r/   Ú__classcell__)rL   r!   s   @@r"   r?   r?   K   sÔ   ù‡ € ñ+ðZ €JØ%Ð'=¸ÐPcÐd€Kà€JØ!"ÐØ€KØ"ÐØÐØ!ÐØ€GØ€JØ#ÐØ$ÐØ&)ÐØ€JØ€LØ€IØ €LØ €LØ+,€LØ %ÐØ !ÐØ €NØ#ÐØ24Ð!Ø €NØ!%ÐØ46Ð#Ø€MØ48€MØ#'ÐØ7;ÐØ#'€Oõ(÷e … r%   r?   N)r?   r2   r   )r=   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   r2   r?   Ú__all__r&   r%   r"   Ú<module>rk      s�   ðñ& "å .å 3Ý #ñ Ð5Ô6Øô$Ð*ó $ó ó 7ð$ñ$ Ð5Ô6Øô+Ð-ó +ó ó 7ð+ñ4 Ð5Ô6Øô[(Ð$ó [(ó ó 7ð[(ò| M‚r%   