+
    UV-jx  ã                   ó\  € ^ RI t ^ RIHt ^ RIHtHtHtHtHt ^RI	H
t
 ] ! R R]
4      4       t] ! R R]
4      4       t] ! R	 R
]
4      4       t] ! R R]
4      4       t] ! R R]
4      4       t] ! R R]
4      4       t] ! R R4      4       t] ! R R4      4       t] ! R R4      4       tR# )é    N)Ú	dataclass)ÚDictÚListÚOptionalÚTupleÚUnion)ÚBaseModelConfigc                   óª   a € ] tR t^t o RtRtRtRtRt^t	^ t
^ t^t^@tRtRtRt^ t^€t^ tR	t^t^t^t^t^ tR
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# )Ú
TextConfigÚdeepseek_v2i � é   iÀ  i€  g      ð?é   i   Úgreedyé   ç�íµ ÷Æ°>g     ˆÃ@FNÚsoftmaxÚDeepseekV2Attentionc                óx   € V P                   ^ 8X  d   RV n        V P                  f   V P                  V n        R# R# )r   ÚLlamaAttentionN)Úqk_nope_head_dimÚ	attn_typeÚnum_key_value_headsÚnum_attention_heads)Úselfs   &Úr/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/mlx_vlm/models/deepseekocr/config.pyÚ__post_init__ÚTextConfig.__post_init__)   s6   € Ø× Ñ  AÔ%Ø-ˆDŒNà×#Ñ#Ò+Ø'+×'?Ñ'?ˆDÖ$ñ ,ó    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&   S[;R&   S[ ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[ ;R&   S[ ;R&   # )é   Ú
model_typeÚ
vocab_sizeÚhidden_sizeÚintermediate_sizeÚmoe_intermediate_sizeÚnum_hidden_layersr   r   Ún_shared_expertsÚn_routed_expertsÚrouted_scaling_factorÚkv_lora_rankÚq_lora_rankÚqk_rope_head_dimÚ
v_head_dimr   Útopk_methodÚn_groupÚ
topk_groupÚnum_experts_per_tokÚmoe_layer_freqÚfirst_k_dense_replaceÚmax_position_embeddingsÚrms_norm_epsÚ
rope_thetaÚrope_traditionalÚrope_scalingÚattention_biasÚscoring_funcr   )ÚstrÚintr   ÚfloatÚboolr   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚTextConfig.__annotate__   s�  ø‡ ‚ áÑ#ñ ñ Ññ ñ Ññ	 ñ
 Ñ!ñ ñ Ñ$ñ ñ Ññ ñ Ñ!ñ ñ Ñ!ñ ñ ™s•mÑ'ñ ñ ™s•mÑ(ñ ñ !Ñ&ñ ñ Ññ ñ Ññ ñ Ññ ñ  Ññ! ñ" Ññ# ñ$ Ññ% ñ& ‘c�]Ññ' ñ( ™•Ñ!ñ) ñ* "¡#�Ñ*ñ+ ñ, Ññ- ñ. Ñ"ñ/ ñ0 !Ñ'ñ1 ñ2 Ññ3 ñ4 Ññ5 ñ6 Ñ"ñ7 ñ8 Ññ9 ñ: Ñ ñ; ñ< Ñ!ñ= ñ> Ñ*ò? r   )r   r   )&Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r!   r"   r#   r$   r%   r&   r   r   r'   r(   r)   r*   r+   r,   r-   r   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r   r   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r@   s   @r   r   r      s·   ø‡ € à#€JØ€JØ€KØ!ÐØ!$ÐØÐØ!ÐØ!ÐØ&'ÐØ&(ÐØ#&ÐØ€LØ€KØÐØ€JØÐØ€KØ€GØ !€JØ)*ÐØ€NØ!"ÐØ#'ÐØ€LØ€JØ"ÐØ€LØ €NØ!€LØ*€Iò@÷C ƒ r   r   c                   ó\   a € ] tR t^1t o ^tRtRtRt^t^àt	^t
^tRtRtRtRtV 3R ltRtV tR# )	ÚVisionConfigi€  é   i   r   gˆ…ZÓ¼ã@Nc                ó¶   <€ V ^8„  d   Qh/ 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    r!   ÚlayersÚwidthr#   r$   r   Ú
image_sizeÚ
patch_sizeÚnum_channelsÚlayer_norm_epsÚ	mlp_ratioÚclsÚparams)r;   r<   r=   Údict)r?   r@   s   "€r   rA   ÚVisionConfig.__annotate__1   sª   ø‡ ‚ á�Oñ ñ Ññ ñ Ññ	 ñ
 Ññ ñ Ñ!ñ ñ Ñ!ñ ñ Ññ ñ Ññ ñ Ññ ñ Ñ ñ ñ Ññ ñ 
�Oñ ñ Ñò r   © )rC   rD   rE   rF   rO   rP   r#   r$   r   rQ   rR   rS   rT   rU   rV   rW   rG   rH   rI   rJ   s   @r   rL   rL   1   sL   ø‡ € ð €FØ€EØ€KØ!ÐØ!ÐØ€JØ€JØ€LØ €NØ€IØ€CØ€F÷ ƒ r   rL   c                   ó0   a € ] tR t^Bt o RtV 3R ltRtV tR# )Ú	MLPConfigÚgeluc                ó>   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   # )r    r#   r$   Ú
hidden_act)r<   r;   )r?   r@   s   "€r   rA   ÚMLPConfig.__annotate__B   s*   ø‡ ‚ áÑñ ñ Ññ ñ Ñò	 r   rZ   N)rC   rD   rE   rF   r_   rG   rH   rI   rJ   s   @r   r\   r\   B   s   ø‡ € ð €J÷	 ƒ r   r\   c                   óH   a € ] tR t^It o RtRtRt^t^t^t	Rt
V 3R ltRtV tR# )ÚProjectorConfigÚlinearr   r   Fc                ón   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )r    Úprojector_typeÚ	input_dimÚn_embedÚdepthrU   Údownsample_ratioÚtoken_pooling)r;   r<   r>   )r?   r@   s   "€r   rA   ÚProjectorConfig.__annotate__I   s]   ø‡ ‚ áÑ"ñ ñ Ññ ñ Ññ	 ñ
 �Nñ ñ Ññ ñ Ññ ñ Ñò r   rZ   N)rC   rD   rE   rF   re   rf   rg   rh   rU   ri   rj   rG   rH   rI   rJ   s   @r   rb   rb   I   s0   ø‡ € à"€NØ€IØ€GØ€EØ€IØÐØ€M÷ ƒ r   rb   c                   óP   a € ] tR t^Tt o RtRt^t^t^t^t	Rt
RtRtV 3R ltRtV tR# )	ÚSAMViTConfigrM   i   é   c                ó  <€ V ^8„  d   Qh/ S[ S[S[S[3,          S[3,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[ S[S[,          S[S[,          3,          ;R&   S[ S[S[,          S[S[,          3,          ;R	&   # )
r    rQ   rP   rO   ÚheadsrR   Úwindow_sizeÚprompt_embed_dimÚglobal_attn_indexesÚdownsample_channels)r   r   r<   r   )r?   r@   s   "€r   rA   ÚSAMViTConfig.__annotate__T   s­   ø‡ ‚ á‘e™C¡˜H•o¡sÐ*Õ+Ñ2ñ ñ Ññ ñ Ññ	 ñ
 �Oñ ñ Ññ ñ Ññ ñ Ññ ñ ™t¡C�y©%±­*Ð4Õ5ÑEñ ñ ™t¡C�y©%±­*Ð4Õ5ÑCò r   rZ   N)r    é   é   é   )r   rM   )rC   rD   rE   rF   rQ   rP   rO   rp   rR   rq   rr   rs   rt   rG   rH   rI   rJ   s   @r   rm   rm   T   s<   ø‡ € à.2€JØ€EØ€FØ€EØ€JØ€KØÐØ8EÐØ8CÐ÷ ƒ r   rm   c                   óh   a € ] tR t^at o RtRtRtRtRtRt	Rt
RtRtRtRt]R	 4       tV 3R
 ltRtV tR# )ÚModelConfigi/÷ Údefaulti¡† i@  i }  Ú2DÚheadNc                ó–  € R V9   d   VR ,          VR&   VR  T ! RR\         P                  VR,          4      R\        P                  VR,          4      R\        P                  VR,          4      /VP	                  4        UUu/ uF7  w  r#V\
        P                  ! V 4      P                  9   g   K,  VR9  g   K5  W#bK9  	  uppB # u uppi )Úlanguage_configÚtext_configÚvision_configÚprojector_configrZ   )r€   r�   r‚   )r   Ú	from_dictrL   rb   ÚitemsÚinspectÚ	signatureÚ
parameters)rV   rW   ÚkÚvs   &&  r   rƒ   ÚModelConfig.from_dicts   s×   € à Ô&Ø$*Ð+<Õ$=ˆF�=Ñ!ØÐ(Ð)áñ 

Ü"×,Ñ,¨V°MÕ-BÓCð

ä&×0Ñ0°¸Õ1HÓIð

ô -×6Ñ6°vÐ>PÕ7QÓRð

ð #ŸL™LœNôá*‘D�AØœ×)Ò)¨#Ó.×9Ñ9Ñ9ô ð ÐQÑQô �’Ù*òñ	

ð 
	
ùós   Â)CÂ0CÂ9Cc                óþ   <€ V ^8„  d   Qh/ 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[S[S[,          ,          ;R&   S[S[,          ;R&   # )r    r€   r�   r‚   r!   Úignore_indexÚimage_token_indexÚvision_feature_select_strategyÚselect_layerÚpad_idÚnum_image_tokensr"   Útile_tagÚglobal_view_posÚeos_token_idÚquantization)r   rL   rb   r;   r<   r   r   r   )r?   r@   s   "€r   rA   ÚModelConfig.__annotate__a   sÒ   ø‡ ‚ áÑñ ñ  Ññ ñ &Ñ%ñ	 ñ
 �Oñ ñ Ññ ñ Ñ#ñ ñ %(Ñ3ñ ñ Ññ ñ Ññ ñ Ññ ñ Ññ ñ Ññ ñ Ñ!ñ ñ ™4¡�9Õ%Ñ,ñ ñ  ™4•.Ñ'ò! r   rZ   iœÿÿÿéÿÿÿÿ)rC   rD   rE   rF   rŒ   r�   rŽ   r�   r�   r‘   r"   r’   r“   r”   r•   Úclassmethodrƒ   rG   rH   rI   rJ   s   @r   rz   rz   a   sZ   ø‡ € ð €LØ#ÐØ*3Ð"Ø€LØ€FØÐØ€JØ€HØ!€OØ(,€LØ#'€Làñ
ó ð
÷' ƒ r   rz   c                   ó4   a € ] tR t^†t o RtRtV 3R ltRtV tR# )ÚConversationz'A class that represents a conversation.ÚUnknownc                óª   <€ V ^8„  d   Qh/ S[ ;R&   S[S[ ,          ;R&   S[S[S[ ,          ,          ;R&   S[;R&   S[;R&   S[ ;R&   S[ ;R&   S[ ;R&   # )	r    ÚsystemÚrolesÚmessagesÚoffsetÚ	sep_styleÚsepÚsep2Úversion)r;   r   r<   )r?   r@   s   "€r   rA   ÚConversation.__annotate__†   st   ø‡ ‚ ñ �Kñ	 ñ
 ‘�9Ññ ñ ‘4™•9�oÑñ ñ �Kñ ñ �Nñ ñ 
�Hñ ñ �Iñ ñ Ñò r   rZ   N)	rC   rD   rE   rF   Ú__doc__r¤   rG   rH   rI   rJ   s   @r   rš   rš   †   s   ø‡ € á1ð €G÷ ƒ r   rš   c                   óL   a € ] tR t^”t o 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# )ÚVLChatProcessorOutputz"
Output of the VL chat processor.
Nc                óú  <€ V ^8„  d   Qh/ S[ ;R&   S[S[,          ;R&   S[;R&   S[S[,          ;R&   S[S[S[,          ,          ;R&   S[S[S[S[,          ,          ,          ;R&   S[S[,          ;R&   S[S[S[,          ,          ;R&   S[S[S[S[,          ,          ,          ;R	&   S[S[S[S[S[,          ,          ,          ,          ;R
&   S[S[S[,          ,          ;R&   S[S[S[,          ,          ;R&   # )r    Ú
sft_formatÚ	input_idsÚpixel_valuesr‘   Úimage_grid_thwÚimage_sizesÚvideosÚaspect_ratio_idsÚaspect_ratio_maskÚcross_attention_maskÚattention_maskÚlabels)r;   r   r<   r   )r?   r@   s   "€r   rA   Ú"VLChatProcessorOutput.__annotate__”   sû   ø‡ ‚ ñ �Oñ ñ ‘C�yÑñ ñ Ññ ñ ™3•iÑñ ñ ™™c�•OÑ#ñ ñ ™$™t¡C�y�/Õ*Ñ1ñ ñ ‘T�NÑ!ñ ñ ™t¡C�yÕ)Ñ0ñ ñ  ¡¡T©#¥Y¥Õ0Ñ7ñ ñ #¡4©©T±#­Y­Õ#8Õ9Ñ@ñ ñ  ™T¡#�YÕ'Ñ.ñ! ñ" ‘T™#•YÕÑ&ò# r   rZ   )rC   rD   rE   rF   r¦   r®   r¯   r°   r±   r²   r³   r´   rG   rH   rI   rJ   s   @r   r¨   r¨   ”   s9   ø‡ € ñð .2€KØ!€FØ,0ÐØ37ÐØ<@ÐØ*.€NØ"&€F÷# ƒ r   r¨   c                   ó,   a € ] tR t^¨t o V 3R ltRtV tR# )ÚBatchCollateOutputc                óJ   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   # )r    r«   r´   r³   r¬   )r   )r?   r@   s   "€r   rA   ÚBatchCollateOutput.__annotate__¨   s5   ø‡ ‚ á�Oñ ñ �Lñ ñ Ññ	 ñ
 Ñò r   rZ   N)rC   rD   rE   rF   rG   rH   rI   rJ   s   @r   r·   r·   ¨   s   ø‡ ‡ „ r   r·   )r…   Údataclassesr   Útypingr   r   r   r   r   Úbaser	   r   rL   r\   rb   rm   rz   rš   r¨   r·   rZ   r   r   Ú<module>r½      s	  ðÛ Ý !ß 5Õ 5å "ð ô%@�ó %@ó ð%@ðP ô�?ó ó ðð  ô�ó ó ðð ô �oó  ó ð ð ô	D�?ó 	Dó ð	Dð ô!
�/ó !
ó ð!
ðH ÷
ð 
ó ð
ð ÷'ð 'ó ð'ð& ÷ð ó òr   