+
    "Ý³j…  ã                   ó®   a € R t0 t ^ RIt^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHtHt ]! ]4      tRt] ^ k R R	 ltR
 R ltR R ltR# )é    N)ÚFinal)ÚLogBar)Ú
AutoConfig)ÚMODEL_CONFIG)Úenv_flagÚis_version_at_leastÚ+warn_if_public_api_transformers_unsupportedÚGPTQMODEL_USE_MODELSCOPEc                ó$   € V ^8„  d   QhR\         /# )é   Úreturn)Úbool)Úformats   "ÚQ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/defuser/utils/hf.pyÚ__annotate__r      s   € ÷ +ñ +œdñ +ó    c                 ó$   € \        \        RR7      # )z€
Return ``True`` when the user explicitly enabled ModelScope integration
via the GPTQMODEL_USE_MODELSCOPE environment variable.
Ú0)Údefault)r   Ú_ENV_VAR© r   r   Úmodelscope_requestedr      s   € ô
 ”H cÔ*Ð*r   c                ó$   € V ^8„  d   QhR\         /# )r   Úmodel_or_path)Ústr)r   s   "r   r   r   !   s   € ÷ ñ ´ñ r   c                ó^  € ^ RI Hp \        P                  P	                  V 4      '       d"   \        P                  P                  W4      pV# \        4       '       g   V! V VRR7      pV# \        4       '       d2   ^ RIHp V! W.R7      p\        P                  P                  WQ4      pV# RpV# )zPResolve one HF or ModelScope file path from either a repo id or local directory.)Úhf_hub_downloadÚmodel)Úrepo_idÚfilenameÚ	repo_type)Úsnapshot_download)Úallow_patternsN)	Úhuggingface_hubr   ÚosÚpathÚisdirÚjoinr   Ú
modelscoper"   )r   Ú	file_namer   Ú
index_pathr"   Úfolders   &&    r   Úget_file_path_via_model_namer-   !   s�   € å/ô 
‡w�w‡}�}�]×#Ò#Ü—W‘W—\‘\ -Ó;ˆ
ð$ Ðô "×#Ò#Ù$Ø!ØØô
ˆ
ð Ðô 
×	Ò	Ý0ñ # =ÀÔMˆÜ—W‘W—\‘\ &Ó4ˆ
ð Ðð ˆ
àÐr   c                ób   € V ^8„  d   QhR\         \        P                  P                  ,          /# )r   Ú
model_name)r   ÚtorchÚnnÚModule)r   s   "r   r   r   <   s    € ÷ #ñ #¤¤u§x¡x§¡Õ!6ñ #r   c                óL  € \        R\        4      '       d   R# \        V \        4      '       d   \        P
                  ! V 4      pM=\        V \        P                  P                  4      '       d   \        V RR4      pVf   R# \        XRR4      pVe   V\        9  d   R# \        V,          pVP                  R4      pV'       d#   \        \        P                  V4      '       g   R#  \        V R4      p\         P"                  P%                  V4      '       do   ^ RIp\)        VR4      ;_uu_ 4       pVP+                  V4      pRRR4       \-        XP                  R	/ 4      P/                  4       4      p	V	 F  p
R
V
9   g   K   R# 	  R#   + '       g   i     LN; i    R# ; i)zOQuickly decide whether a model likely still needs Defuser's runtime conversion.zpre_check_config()FÚconfigNÚ
model_typeÚmin_transformers_versionzmodel.safetensors.index.jsonÚrÚ
weight_mapÚgate_up_projT)r	   ÚloggerÚ
isinstancer   r   Úfrom_pretrainedr0   r1   r2   Úgetattrr   Úgetr   ÚtransformersÚ__version__r-   r%   r&   ÚexistsÚjsonÚopenÚloadÚlistÚkeys)r/   r4   r5   ÚcfgÚmin_verÚ	file_pathrB   ÚfÚ
index_dataÚ
model_keysÚkeys   &          r   Úpre_check_configrN   <   s@  € ä2Ð3GÌ×PÒPÙä�*œc×"Ò"Ü×+Ò+¨JÓ7‰Ü	�J¤§¡§¡×	0Ò	0Ü˜ X¨tÓ4ˆØŠ>Ùä˜ ¨tÓ4€JØÒ˜Z¬|Ô;Ùä
�zÕ
"€Cà�g‰gÐ0Ó1€GßÔ*¬<×+CÑ+CÀW×MÒMÙðÜ0°Ð=[Ó\ˆ	Ü�7‰7�>‰>˜)×$Ò$Ûä�i ×%Ô%¨Ø!ŸY™Y q›\�
÷ &ô ˜jŸn™n¨\¸2Ó>×CÑCÓEÓFˆJÛ!�Ø! SÖ(Ú ñ "ñ
 ÷ &×%ûðÚús1   Ã*A	F Ä3FÅ:F ÆF ÆF ÆF	ÆF ÆF#c                óV   € V ^8„  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r   r   )Ú__conditional_annotations__r   r   )r   s   "r   r   r   	   s   € ‡	�	÷ 2Ò 1Œ%”�*Ñ 1ò 
r   )rP   r%   Útypingr   r0   r?   Úlogbarr   r   Údefuser.model_registryr   Údefuser.utils.commonr   r   r	   Ú__name__r:   r   r   r-   rN   r   )rP   s   @r   Ú<module>rV      sF   øð÷ 
€	Ý ã Û Ý Ý #å /ß kÑ ká	�Ó	€à1€Ó 1õ+õ÷6#r   