+
    œ°³jý<  ã                   óä  € ^ RI Ht ^ RIt^ RIHt ^ RIHt ^RIHt	 ^RI
Ht ^RIHtHt ^RIHtHt ^RIHt ^R	IHtHtHt ^R
IHtHtHtHtHtHt ^RIH t  ^RI!H"t"H#t# ]PH                  ! ]%4      t&]! RR7      ] ! R R]4      4       4       t' ! R R]4      t( ! R R]"4      t) ! R R]4      t* ! R R]4      t+ ! R R]4      t, ! R R]4      t-] ! R R]4      4       t. ! R R ]4      t/. R!Ot0R# )"é    )ÚCallableN)Ústrict)Úinitialization)ÚPreTrainedConfig)ÚBaseModelOutputÚBaseModelOutputWithPooling)ÚALL_ATTENTION_FUNCTIONSÚPreTrainedModel)ÚUnpack)ÚTransformersKwargsÚauto_docstringÚlogging)ÚCLIPMLPÚCLIPAttentionÚCLIPEncoderÚCLIPEncoderLayerÚCLIPVisionEmbeddingsÚCLIPVisionModel)Úeager_attention_forward)ÚQwen2_5_VLVisionRotaryEmbeddingÚapply_rotary_pos_emb_visionz&DeepGlint-AI/mlcd-vit-bigG-patch14-336)Ú
checkpointc                   ót   a € ] tR t^)t o RtRtRtRtRtRt	^0t
^t^t^tRt^tRtR	tR
tRtRtRtV 3R ltRtV tR# )ÚMLCDVisionConfigaF  
num_key_value_groups (`int`, *optional*, defaults to 1):
    Number of key-value groups used in Attention.

Example:

```python
>>> from transformers import MLCDVisionConfig, MLCDVisionModel

>>> # Initializing a MLCDVisionConfig with DeepGlint-AI/mlcd-vit-bigG-patch14-336 style configuration
>>> configuration = MLCDVisionConfig()

>>> # Initializing a MLCDVisionModel (with random weights) from the DeepGlint-AI/mlcd-vit-bigG-patch14-336 style configuration
>>> model = MLCDVisionModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```Úmlcd_vision_modelÚvision_configÚaxiali€  i    iP  Úgelugñhãˆµøä>ç        g{®Gáz”?g      ð?Nc                ól  <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   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[S[ ,          ;R&   S[;R&   S[;R&   S[R,          ;R&   # )é   Úhidden_sizeÚintermediate_sizeÚnum_hidden_layersÚnum_attention_headsÚnum_key_value_groupsÚnum_channelsÚ
image_sizeÚ
patch_sizeÚ
hidden_actÚlayer_norm_epsÚattention_dropoutÚinitializer_rangeÚinitializer_factorNÚrope_parameters)ÚintÚlistÚtupleÚstrÚfloatÚdict)ÚformatÚ__classdict__s   "€Úf/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/mlcd/modular_mlcd.pyÚ__annotate__ÚMLCDVisionConfig.__annotate__)   sý   ø‡ ‚ ñ4 Ññ5 ñ6 Ñ!ñ7 ñ8 Ññ9 ñ: Ñ!ñ; ñ< Ñ!ñ= ñ> Ññ? ñ@ ‘d™3•i•¡%©©S¨¥/Õ1Ñ7ñA ñB ‘d™3•i•¡%©©S¨¥/Õ1Ñ6ñC ñD ÑñE ñF Ñ ñG ñH ™s•{Ñ(ñI ñJ Ñ#ñK ñL Ñ#ñM ñN ˜D•[Ñ'òO ó    © )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
model_typeÚbase_config_keyÚdefault_rope_typer"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r7   s   @r8   r   r   )   sq   ø‡ € ñð& %€JØ%€OØÐà€KØ!ÐØÐØ!ÐØ !ÐØ€LØ47€JØ46€JØ€JØ €NØ%(ÐØ#ÐØ #ÐØ#'€O÷O ƒ r;   r   c                   ó   € ] tR t^StRtR# )ÚMLCDMLPr<   N©r=   r>   r?   r@   rF   r<   r;   r8   rI   rI   S   ó   † Ûr;   rI   c                   ó   € ] tR t^WtRtR# )ÚMLCDRotaryEmbeddingr<   NrJ   r<   r;   r8   rM   rM   W   rK   r;   rM   c                   óP   a a€ ] tR t^[t oV3R lV 3R lltV3R lR ltRtVtV ;t# )ÚMLCDVisionEmbeddingsc                ó    <€ V ^8„  d   QhRS[ /# ©r!   Úconfig©r   )r6   r7   s   "€r8   r9   Ú!MLCDVisionEmbeddings.__annotate__\   s   ø€ ÷ $ñ $Ñ/ñ $r;   c                ó*   <€ \         SV `  V4       V =R # ©N)ÚsuperÚ__init__Úposition_embedding©ÚselfrR   Ú	__class__s   &&€r8   rX   ÚMLCDVisionEmbeddings.__init__\   s   ø€ Ü‰Ñ˜Ô ØÒ#r;   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# )r!   Úpixel_valuesÚreturn)ÚtorchÚFloatTensorÚTensor)r6   r7   s   "€r8   r9   rT   `   s%   ø€ ÷ 
ñ 
¡E×$5Ñ$5ð 
¹%¿,¹,ñ 
r;   c                ó\  € VP                   ^ ,          pV P                  P                  P                  pV P                  VP	                  VR7      4      pVP                  ^4      P                  ^^4      pV P                  P                  V^R4      p\        P                  ! WT.^R7      pV# )r   )Údtype©Údiméÿÿÿÿ)ÚshapeÚpatch_embeddingÚweightre   ÚtoÚflattenÚ	transposeÚclass_embeddingÚexpandra   Úcat)r[   r_   Ú
batch_sizeÚtarget_dtypeÚpatch_embedsÚclass_embedsÚ
embeddingss   &&     r8   ÚforwardÚMLCDVisionEmbeddings.forward`   s”   € Ø!×'Ñ'¨Õ*ˆ
Ø×+Ñ+×2Ñ2×8Ñ8ˆà×+Ñ+¨L¯O©OÀ,¨OÓ,OÓPˆØ#×+Ñ+¨AÓ.×8Ñ8¸¸AÓ>ˆà×+Ñ+×2Ñ2°:¸qÀ"ÓEˆÜ—Y’Y Ð;ÀÔCˆ
àÐr;   r<   ©	r=   r>   r?   r@   rX   rw   rF   rG   Ú__classcell__©r\   r7   s   @@r8   rO   rO   [   s   ù‡ € ÷$ó $÷
÷ 
ð 
r;   rO   c                   óX   a a€ ] tR t^mt oRtV3R lV 3R lltRV3R lR lltRtVtV ;t	# )ÚMLCDAttentionzëMulti-headed attention with RoPE. Refer to papers:
- Attention is all you need:
    https://huggingface.co/papers/1706.03762
- RoFormer: Enhanced Transformer with Rotary Position Embedding:
    https://huggingface.co/papers/2104.09864
c                ó    <€ V ^8„  d   QhRS[ /# rQ   rS   )r6   r7   s   "€r8   r9   ÚMLCDAttention.__annotate__u   s   ø€ ÷ ñ Ñ/ñ r;   c                óV   <€ \         SV `  V4       VP                  V n        R V n        R# )FN)rW   rX   r&   Ú	is_causalrZ   s   &&€r8   rX   ÚMLCDAttention.__init__u   s%   ø€ Ü‰Ñ˜Ô Ø$*×$?Ñ$?ˆÔ!ØˆŽr;   c                ó  <€ V ^8„  d   QhRS[ P                  RS[S[ P                  S[ P                  3,          RS[ P                  R,          RS[S[,          RS[S[ P                  S[ P                  R,          3,          /# ©r!   Úhidden_statesÚposition_embeddingsÚattention_maskNÚkwargsr`   )ra   rc   r2   r   r   )r6   r7   s   "€r8   r9   r   z   sy   ø€ ÷ ,)ñ ,)á—|‘|ð,)ñ #¡5§<¡<±·±Ð#=Õ>ð,)ñ Ÿ™ tÕ+ð	,)ñ
 Ñ+Õ,ð,)ñ 
‰u�|‰|™UŸ\™\¨DÕ0Ð0Õ	1ñ,)r;   c           	     ó¬  € VP                   R R w  rVV P                  V4      P                  WVV P                  V P                  34      pV P                  V4      P                  WVV P                  V P                  34      pV P                  V4      P                  WVV P                  V P                  34      p	V^ ,          P                  ^ 4      P                  4       p
V^,          P                  ^ 4      P                  4       p\        WxW«4      w  rxVP                  ^ ^^^4      P                  4       pVP                  ^ ^^^4      P                  4       pV	P                  ^ ^^^4      P                  4       p	\        P                  ! V P                  P                  \         4      pT! V VVV	V3RV P"                  '       g   RMV P$                  RV P&                  RV P(                  /VB w  rÞVP                  ^^ ^^4      P                  4       pVP+                  WeR4      pV P-                  V4      pVP                  ^^ ^4      P                  4       pWÞ3# )NÚdropoutr   Úscalingr�   rh   )ri   Úq_projÚreshapeÚ	num_headsÚhead_dimÚk_projÚv_projÚ	unsqueezer4   r   ÚpermuteÚ
contiguousr	   Úget_interfacerR   Ú_attn_implementationr   ÚtrainingrŠ   Úscaler�   ÚviewÚout_proj)r[   r…   r†   r‡   rˆ   rr   Ú
seq_lengthÚquery_statesÚ
key_statesÚvalue_statesÚcosÚsinÚattention_interfaceÚattn_outputÚattn_weightss   &&&&,          r8   rw   ÚMLCDAttention.forwardz   s6  € ð "/×!4Ñ!4°S°bÐ!9Ñˆ
ð —{‘{ =Ó1×9Ñ9¸:ÐSW×SaÑSaÐcg×cpÑcpÐ:qÓrˆØ—[‘[ Ó/×7Ñ7¸ÐQU×Q_ÑQ_Ðae×anÑanÐ8oÓpˆ
Ø—{‘{ =Ó1×9Ñ9¸:ÐSW×SaÑSaÐcg×cpÑcpÐ:qÓrˆð " !Õ$×.Ñ.¨qÓ1×7Ñ7Ó9ˆØ! !Õ$×.Ñ.¨qÓ1×7Ñ7Ó9ˆÜ#>¸|ÐY\Ó#bÑ ˆð $×+Ñ+¨A¨q°!°QÓ7×BÑBÓDˆØ×'Ñ'¨¨1¨a°Ó3×>Ñ>Ó@ˆ
Ø#×+Ñ+¨A¨q°!°QÓ7×BÑBÓDˆä(?×(MÒ(MØ�K‰K×,Ñ,Ô.Eó)
Ðñ %8ØØØØØñ
%
ð  $Ÿ}Ÿ}˜}‘C°$·,±,ð
%
ð —J‘Jð
%
ð —n‘nð
%
ð ñ
%
Ñ!ˆð "×)Ñ)¨!¨Q°°1Ó5×@Ñ@ÓBˆØ!×&Ñ& z¸rÓBˆØ—m‘m KÓ0ˆØ!×)Ñ)¨!¨Q°Ó2×=Ñ=Ó?ˆØÐ(Ð(r;   )r�   r&   rV   ©
r=   r>   r?   r@   rA   rX   rw   rF   rG   rz   r{   s   @@r8   r}   r}   m   s#   ù‡ € ñ÷ó ÷
,)÷ ,)ò ,)r;   r}   c                   óT   a a€ ] tR t^©t oV3R lV 3R lltRV3R lR lltRtVtV ;t# )ÚMLCDEncoderLayerc                ó    <€ V ^8„  d   QhRS[ /# rQ   rS   )r6   r7   s   "€r8   r9   ÚMLCDEncoderLayer.__annotate__ª   s   ø€ ÷ /ñ /Ñ/ñ /r;   c                óF   <€ \         SV `  V4       \        V4      V n        R # rV   )rW   rX   r}   Ú	self_attnrZ   s   &&€r8   rX   ÚMLCDEncoderLayer.__init__ª   s   ø€ Ü‰Ñ˜Ô Ü& vÓ.ˆŽr;   c                óà   <€ V ^8„  d   QhRS[ P                  RS[S[ P                  S[ P                  3,          RS[ P                  R,          RS[S[,          RS[S[ P
                  ,          /# r„   )ra   rc   r2   r   r   rb   )r6   r7   s   "€r8   r9   r©   ®   sm   ø€ ÷ "ñ "á—|‘|ð"ñ #¡5§<¡<±·±Ð#=Õ>ð"ñ Ÿ™ tÕ+ð	"ñ
 Ñ+Õ,ð"ñ 
‰u× Ñ Õ	!ñ"r;   c           	     óÈ   € TpV P                  V4      pV P                  ! RRVRVRV/VB w  rWQ,           pTpV P                  V4      pV P                  V4      pWQ,           pV# )ah  
Args:
    hidden_states (`torch.FloatTensor`):
        Input to the layer of shape `(batch, seq_len, embed_dim)`.
        Represents the hidden states from the previous layer or the input embeddings.
    position_embeddings (`tuple[torch.Tensor, torch.Tensor]`):
        A tuple of two tensors, each of shape `(batch, seq_len, embed_dim)`.
        Represents absolute positional embeddings for the query and key in the attention mechanism.
    attention_mask (`torch.FloatTensor`):
        Attention mask of shape `(batch, 1, q_len, k_v_seq_len)` where padding elements are indicated by very large negative values.
r…   r†   r‡   r<   )Úlayer_norm1r«   Úlayer_norm2Úmlp)r[   r…   r†   r‡   rˆ   ÚresidualÚ_s   &&&&,  r8   rw   ÚMLCDEncoderLayer.forward®   s‰   € ð$ !ˆà×(Ñ(¨Ó7ˆØŸ>š>ñ 
Ø'ð
à 3ð
ð *ð
ð ñ	
Ñˆð !Õ0ˆà ˆØ×(Ñ(¨Ó7ˆØŸ™ Ó/ˆØ Õ0ˆàÐr;   )r«   rV   ry   r{   s   @@r8   r§   r§   ©   s   ù‡ € ÷/ó /÷"÷ "ò "r;   r§   c                   óX   a a€ ] tR t^Ót oRtV3R lV 3R lltRV3R lR lltRtVtV ;t	# )ÚMLCDEncoderzŸ
Transformer encoder consisting of `config.num_hidden_layers` self attention layers. Each layer is a
[`MLCDEncoderLayer`].

Args:
    config: MLCDVisionConfig
c                ó    <€ V ^8„  d   QhRS[ /# rQ   rS   )r6   r7   s   "€r8   r9   ÚMLCDEncoder.__annotate__Ü   s   ø€ ÷ !ñ !Ñ/ñ !r;   c                ó&   <€ \         SV `  V4       R# )z3Overwrite dummy `MLCDConfig` to `MLCDVisionConfig`.N)rW   rX   rZ   s   &&€r8   rX   ÚMLCDEncoder.__init__Ü   s   ø€ ä‰Ñ˜Ö r;   c                óÌ   <€ V ^8„  d   QhRS[ P                  RS[S[ P                  S[ P                  3,          RS[ P                  R,          RS[S[,          RS[S[,          /# )r!   Úinputs_embedsr†   r‡   Nrˆ   r`   )ra   rb   r2   rc   r   r   r   )r6   r7   s   "€r8   r9   r¸   à   si   ø€ ÷ !
ñ !
á×(Ñ(ð!
ñ #¡5§<¡<±·±Ð#=Õ>ð!
ñ Ÿ™ tÕ+ð	!
ñ
 Ñ+Õ,ð!
ñ 
‘Õ	 ñ!
r;   c                óZ   € TpV P                    F  pV! VVV3/ VB pK  	  \        VR7      # )aÍ  
Args:
    inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`):
        Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation.
        This is useful if you want more control over how to convert `input_ids` indices into associated vectors
        than the model's internal embedding lookup matrix.
    position_embeddings (`tuple[torch.Tensor, torch.Tensor]`):
        A tuple of two tensors, each of shape `(batch, seq_len, embed_dim)`.
        Represents absolute positional embeddings for the query and key in the attention mechanism.
    attention_mask (`torch.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
        Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:
        - 1 for tokens that are **not masked**,
        - 0 for tokens that are **masked**.
        [What are attention masks?](../glossary#attention-mask)
)Úlast_hidden_state)Úlayersr   )r[   r¼   r†   r‡   rˆ   r…   Úencoder_layers   &&&&,  r8   rw   ÚMLCDEncoder.forwardà   sF   € ð, &ˆØ!Ÿ[œ[ˆMÙ)ØØ#Øñð ñ	ŠMñ )ô Ø+ô
ð 	
r;   r<   rV   r¥   r{   s   @@r8   r¶   r¶   Ó   s#   ù‡ € ñ÷!ó !÷!
÷ !
ò !
r;   r¶   c                   ó”   a a€ ] tR tRt oRtR.tRtRtRtRt	Rt
RtR]R]/t]P                   ! 4       V 3R l4       tV3R	 ltR
tVtV ;t# )ÚMLCDPreTrainedModeli  Úvision_modelr§   TFr…   Ú
attentionsc                ó  <€ \         SV `  V4       V P                  P                  p\	        V\
        4      '       dú   V P                  P                  p\        P                  ! VP                  RVP                  R,          V,          R7       \        P                  ! VP                  P                  VP                  P                  V,          R7       \        P                  ! VP                  \        P                   ! VP                  P"                  R,          4      P%                  R4      4       R# \	        V\&        4      '       Ed&   V P                  P                  pVP                  R,          ^VP                  P(                  ,          R,          ,          V,          pVP                  R,          V,          p\        P                  ! VP*                  P                  VR7       \        P                  ! VP,                  P                  VR7       \        P                  ! VP.                  P                  VR7       \        P                  ! VP0                  P                  VR7       R# \	        V\2        4      '       dé   V P                  P                  pVP                  P4                  R,          ^VP                  P(                  ,          R,          ,          V,          p^VP                  P4                  ,          R,          V,          p\        P                  ! VP6                  P                  VR7       \        P                  ! VP8                  P                  VR7       R# \	        V\:        4      '       d‚   V P                  P                  pVP                  P4                  VP                  P<                  ,          ^,          R,          V,          p\        P                  ! VP>                  RVR7       R# R# )zInitialize the weightsr   )ÚmeanÚstd)rÈ   Ng      à¿rh   )é   rh   ) rW   Ú_init_weightsrR   r.   Ú
isinstancerO   ÚinitÚnormal_ro   Ú	embed_dimrj   rk   r-   Úcopy_Úposition_idsra   Úarangeri   rp   r}   r$   rŒ   r�   r‘   rš   rI   r"   Úfc1Úfc2ÚMLCDVisionModelr%   Úclass_pos_emb)r[   ÚmoduleÚfactorÚin_proj_stdÚout_proj_stdÚfc_stdÚpos_emb_stdr\   s   &&     €r8   rÊ   Ú!MLCDPreTrainedModel._init_weights  s‘  ø€ ô 	‰Ñ˜fÔ%Ø—‘×/Ñ/ˆÜ�fÔ2×3Ò3Ø—[‘[×3Ñ3ˆFÜ�LŠL˜×/Ñ/°c¸v×?OÑ?OÐQUÕ?UÐX^Õ?^Õ_Ü�LŠL˜×/Ñ/×6Ñ6¸F¿M¹M×<[Ñ<[Ð^dÕ<dÕeÜ�JŠJ�v×*Ñ*¬E¯LªL¸×9LÑ9L×9RÑ9RÐSUÕ9VÓ,W×,^Ñ,^Ð_fÓ,gÖhÜ˜¤×.Ó.Ø—[‘[×3Ñ3ˆFØ!×+Ñ+¨TÕ1°q¸6¿=¹=×;ZÑ;ZÕ7ZÐ_cÕ6cÕdÐgmÕmˆKØ"×,Ñ,¨dÕ2°fÕ<ˆLÜ�LŠL˜Ÿ™×-Ñ-°;Õ?Ü�LŠL˜Ÿ™×-Ñ-°;Õ?Ü�LŠL˜Ÿ™×-Ñ-°;Õ?Ü�LŠL˜Ÿ™×/Ñ/°\×BÜ˜¤×(Ò(Ø—[‘[×3Ñ3ˆFØ!Ÿ=™=×4Ñ4°dÕ:ÀÀFÇMÁM×DcÑDcÕ@cÐhlÕ?lÕmÐpvÕvˆKØ˜&Ÿ-™-×3Ñ3Õ3¸Õ<¸vÕEˆFÜ�LŠL˜Ÿ™×*Ñ*°Õ7Ü�LŠL˜Ÿ™×*Ñ*°×<Ü˜¤×0Ò0Ø—[‘[×3Ñ3ˆFØ!Ÿ=™=×4Ñ4¸¿¹×8YÑ8YÕYÐ]^Õ^ÐcgÕgÐjpÕpˆKÜ�LŠL˜×-Ñ-°C¸[×Iñ 1r;   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # rQ   rS   )r6   r7   s   "€r8   r9   Ú MLCDPreTrainedModel.__annotate__  s   ø‡ ‚ áÑò r;   r<   )r=   r>   r?   r@   Úbase_model_prefixÚ_no_split_modulesÚsupports_gradient_checkpointingÚaccepts_loss_kwargsÚ_supports_flash_attnÚ_supports_sdpaÚ_supports_flex_attnÚ_supports_attention_backendr§   r}   Ú_can_record_outputsra   Úno_gradrÊ   rE   rF   rG   rz   r{   s   @@r8   rÃ   rÃ     so   ù‡ € ð 'ÐØ+Ð,ÐØ&*Ð#ØÐØÐØ€NØÐØ"&ÐàÐ)Ø�mðÐð
 ‡]‚]ƒ_ôJó ðJ÷# … r;   rÃ   c                   óT   a a€ ] tR tRt oV3R lV 3R lltRV3R lR lltRtVtV ;t# )rÔ   i2  c                ó    <€ V ^8„  d   QhRS[ /# rQ   rS   )r6   r7   s   "€r8   r9   ÚMLCDVisionModel.__annotate__3  s   ø€ ÷ qñ qÑ/ñ qr;   c                óê   <€ \         SV `  V4       \        V4      V n        \        P
                  ! \        P                  ! ^VP                  VP                  ,          ^,          4      4      V n
        R# )rÉ   N)rW   rX   rM   Úvision_rotary_embeddingÚnnÚ	Parameterra   Úrandnr"   r%   rÕ   rZ   s   &&€r8   rX   ÚMLCDVisionModel.__init__3  sP   ø€ Ü‰Ñ˜Ô Ü':¸6Ó'BˆÔ$ÜŸ\š\¬%¯+ª+°a¸×9KÑ9KÈv×OiÑOiÕ9iÐmnÕ9nÓ*oÓpˆÖr;   c                ón   <€ V ^8„  d   QhRS[ P                  R,          RS[S[,          RS[S[,          /# )r!   r_   Nrˆ   r`   )ra   rb   r   r   r2   r   )r6   r7   s   "€r8   r9   rë   8  sE   ø€ ÷ @
ñ @
á×'Ñ'¨$Õ.ð@
ñ Ñ+Õ,ð@
ñ 
Ñ+Õ	+ñ	@
r;   c                óN  € Vf   \        R4      hV P                  V4      pV P                  V4      pVP                  R,          V P                  P
                  ,          pVP                  R,          V P                  P
                  ,          p\        P                  ! WAP                  R7      P                  ^4      P                  RV4      p\        P                  ! WQP                  R7      P                  ^ 4      P                  VR4      p\        P                  ! VP                  4       VP                  4       .RR7      pV P                  W84      p	\        P                  ! V P                  V P                  .RR7      p
\        P                  ! V
P!                  4       V	^ ,          .^ R7      \        P                  ! V
P#                  4       V	^,          .^ R7      .p	V P$                  ! R	RVRV	/VB pV^ ,          pVR
,          pV P'                  V4      p\)        VVR7      # )ac  
Example:

```python
>>> import httpx
>>> from io import BytesIO
>>> from PIL import Image
>>> from transformers import AutoProcessor, MLCDVisionModel
>>> model = MLCDVisionModel.from_pretrained("DeepGlint-AI/mlcd-vit-bigG-patch14-448")
>>> processor = AutoProcessor.from_pretrained("DeepGlint-AI/mlcd-vit-bigG-patch14-448")

>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
>>> with httpx.stream("GET", url) as response:
...     image = Image.open(BytesIO(response.read()))
>>> inputs = processor(images=image, return_tensors="pt")

>>> with torch.no_grad():
...     outputs = model(**inputs, output_attentions=True)

>>> features = outputs.last_hidden_state
>>> print(f"Extracted features shape: {features.shape}")
>>> print(f"Number of attention layers: {len(outputs.attentions)}")
>>> print(f"Attention shape: {outputs.attentions[0].shape}")
```z You have to specify pixel_values)Údevicerf   r¼   r†   )r¾   Úpooler_outputéþÿÿÿrh   r<   )ºNNNr   r÷   )Ú
ValueErrorrv   Úpre_layrnormri   rR   r)   ra   rÑ   rô   r’   rp   Ústackrm   rí   rq   rÕ   rŸ   r    ÚencoderÚpost_layernormr   )r[   r_   rˆ   r…   Únum_patches_heightÚnum_patches_widthÚhpos_idsÚwpos_idsÚpos_idsr†   rÕ   Úencoder_outputsr¾   Úpooled_outputs   &&,           r8   rw   ÚMLCDVisionModel.forward8  sè  € ð: ÒÜÐ?Ó@Ð@àŸ™¨Ó5ˆØ×)Ñ)¨-Ó8ˆà)×/Ñ/°Õ3°t·{±{×7MÑ7MÕMÐØ(×.Ñ.¨rÕ2°d·k±k×6LÑ6LÕLÐä�LŠLÐ+×4GÑ4GÔH×RÑRÐSTÓU×\Ñ\Ð]_ÐarÓsð 	ô �LŠLÐ*×3FÑ3FÔG×QÑQÐRSÓT×[Ñ[Ð\nÐprÓsð 	ô —+’+˜x×/Ñ/Ó1°8×3CÑ3CÓ3EÐFÈBÔOˆØ"×:Ñ:¸=ÓRÐÜŸ	š	 4×#5Ñ#5°t×7IÑ7IÐ"JÐPRÔSˆä�IŠI�}×(Ñ(Ó*Ð,?ÀÕ,BÐCÈÔKÜ�IŠI�}×(Ñ(Ó*Ð,?ÀÕ,BÐCÈÔKð
Ðð
 Ÿ,š,ñ 
Ø'ð
à 3ð
ð ñ
ˆð ,¨AÕ.ÐØ)¨'Õ2ˆØ×+Ñ+¨MÓ:ˆä)Ø/Ø'ô
ð 	
r;   )rÕ   rí   rV   ry   r{   s   @@r8   rÔ   rÔ   2  s#   ù‡ € ÷qó q÷
@
÷ @
ò @
r;   rÔ   )r   rÃ   rÔ   )1Úcollections.abcr   ra   Útorch.nnrî   Úhuggingface_hub.dataclassesr   Ú r   rÌ   Úconfiguration_utilsr   Úmodeling_outputsr   r   Úmodeling_utilsr	   r
   Úprocessing_utilsr   Úutilsr   r   r   Úclip.modeling_clipr   r   r   r   r   r   Úllama.modeling_llamar   Úqwen2_5_vl.modeling_qwen2_5_vlr   r   Ú
get_loggerr=   Úloggerr   rI   rM   rO   r}   r§   r¶   rÃ   rÔ   Ú__all__r<   r;   r8   Ú<module>r     sû   ðõ %ã Ý Ý .å &Ý 3ß Kß FÝ &ß @Ñ @÷÷ õ ;ß ið 
×	Ò	˜HÓ	%€ñ ÐCÔDØô%(Ð'ó %(ó ó Eð%(ôP	ˆgô 	ô	Ð9ô 	ôÐ/ô ô$9)�Mô 9)ôx'Ð'ô 'ôT.
�+ô .
ðb ô*J˜/ó *Jó ð*JôZF
�oô F
òR‚r;   