+
    œ°³j~
  ã                   ó�   € ^ RI Ht ^RIHt ]'       d   ^RIHt ^RIHtHt ^RI	H
t
 ]P                  ! ]4      t ! R R]4      tR# )	é    )ÚTYPE_CHECKING)ÚHfQuantizer)ÚPreTrainedModel)Úis_auto_round_availableÚlogging©ÚQuantizationConfigMixinc                   ó’   a a€ ] tR t^t oRtRtV3R lV 3R lltR tV3R lR ltV3R lR	 lt	]
V3R
 lR l4       tR tRtVtV ;t# )ÚAutoRoundQuantizerzO
Quantizer of the AutoRound method. (https://huggingface.co/papers/2309.05516)
Tc                ó    <€ V ^8„  d   QhRS[ /# )é   Úquantization_configr   )ÚformatÚ__classdict__s   "€Úm/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/quantizers/quantizer_auto_round.pyÚ__annotate__ÚAutoRoundQuantizer.__annotate__%   s   ø€ ÷ 8ñ 8Ñ,Cñ 8ó    c                ó*   <€ \         SV `  ! V3/ VB  R # )N)ÚsuperÚ__init__)Úselfr   ÚkwargsÚ	__class__s   &&,€r   r   ÚAutoRoundQuantizer.__init__%   s   ø€ Ü‰ÒÐ,Ñ7°Ô7r   c                óh   € VP                  R 4      V n        \        4       '       g   \        R4      hR# )Ú
device_mapzbLoading an AutoRound quantized model requires auto-round library (`pip install 'auto-round>=0.5'`)N)Úgetr   r   ÚImportError)r   Úargsr   s   &*,r   Úvalidate_environmentÚ'AutoRoundQuantizer.validate_environment(   s0   € Ø Ÿ*™* \Ó2ˆŒÜ&×(Ò(ÜØtóð ñ )r   c                ó   <€ V ^8„  d   QhRR/# ©r   Úmodelr   © )r   r   s   "€r   r   r   /   s   ø€ ÷ /ñ /Ð:Kñ /r   c                óâ   € VP                   P                  R 8w  d   \        P                  R4       ^ RIHpHp V P                  '       d%   V! V P                  4      pV! W4      w  rW`n	        R# R# )Ú	input_idszRAutoRound offers only limited support for models that are not strictly text-based.)Úconvert_hf_modelÚinfer_target_deviceN)
r   Úmain_input_nameÚloggerÚwarningÚ"auto_round.inference.convert_modelr)   r*   Úpre_quantizedr   Úused_backends)r   r%   r   r)   r*   Útarget_devicer0   s   &&,    r   Ú$_process_model_before_weight_loadingÚ7AutoRoundQuantizer._process_model_before_weight_loading/   sV   € Ø�?‰?×*Ñ*¨kÔ9Ü�N‰NÐoÔpß\à××ÐÙ/°·±Ó@ˆMÙ#3°EÓ#IÑ ˆEØ!.Öñ r   c                ó   <€ V ^8„  d   QhRR/# r$   r&   )r   r   s   "€r   r   r   9   s   ø€ ÷ Lñ LÐ9Jñ Lr   c                óp   € V P                   '       d   ^ RIHp V! WP                  4       R# \	        R4      h)r   )Ú	post_initz+AutoRound only sports pre-quantized models.N)r/   r.   r6   r0   Ú
ValueError)r   r%   r   r6   s   &&, r   Ú#_process_model_after_weight_loadingÚ6AutoRoundQuantizer._process_model_after_weight_loading9   s+   € Ø××ÐÝDá�e×/Ñ/Ö0äÐJÓKÐKr   c                ó    <€ V ^8„  d   QhRS[ /# )r   Úreturn)Úbool)r   r   s   "€r   r   r   B   s   ø€ ÷ ñ ™dñ r   c                ó   € R # )Fr&   ©r   s   &r   Úis_trainableÚAutoRoundQuantizer.is_trainableA   s   € ár   c                ó   € R # )Tr&   r>   s   &r   Úis_serializableÚ"AutoRoundQuantizer.is_serializableE   s   € ár   )r   r0   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úrequires_calibrationr   r!   r2   r8   Úpropertyr?   rB   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r   r   s   @@r   r   r      sU   ù‡ € ñð
  Ð÷8ó 8ò÷/ð /÷Lð Lð ÷ó ð÷ò r   r   N)Útypingr   Úbaser   Úmodeling_utilsr   Úutilsr   r   Úutils.quantization_configr	   Ú
get_loggerrD   r,   r   r&   r   r   Ú<module>rT      s9   ðõ !å ÷ Ý0ç 4Ý ?ð 
×	Ò	˜HÓ	%€ô*˜ö *r   