+
    QV-j  ã                   óò   € R t ^RIHt ^RIHtHt ]! 4       '       d   ^ RIt^ RIHt ]P                  ! ]
4      tRRRRR/RRRRR	/R
RRRR	/RRRRR/RRRRR/RRRRR	/RRRRR/RRRRR	//tR tRR R lltR# )z;AWQ (Activation aware Weight Quantization) integration file)Úshould_convert_module)Úis_torch_availableÚloggingNÚ
starcoder2ÚactÚlayer_before_actÚc_fcÚRefinedWebModelÚdense_h_to_4hÚfalconÚmptÚup_projÚgptjÚfc_inÚgpt_neoxÚgpt_bigcodeÚbloomÚ	gelu_implc                 óœ  € ^ RI Hp V\        9  d   V # V P                  4        F¤  w  r4\        V,          R,          p\        V,          R,          pW58X  dg   \	        W4      '       dV   \        V \        V,          R,          4      pVP                  p\        P                  ! V4      p	V! WI4      V P                  V&   \        WA4      p
K¦  	  V # )é    )ÚScaledActivationr   r   )Ú&gptqmodel.quantization.awq.modules.actr   ÚAWQ_SCALES_MAPPINGSÚnamed_childrenÚhasattrÚgetattrÚout_featuresÚtorchÚonesÚ_modulesÚreplace_quantization_scales)ÚmodelÚ
model_typer   ÚnameÚmoduleÚact_nameÚlayer_before_act_namer   ÚsizeÚ
scale_likeÚ_s   &&         Ún/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/transformers/integrations/awq.pyr    r    '   s®   € ÝGàÔ,Ô,ØˆØ×,Ñ,Ö.‰ˆÜ& zÕ2°5Õ9ˆÜ 3°JÕ ?Ð@RÕ SÐØÔ¤¨× EÒ EÜ& uÔ.AÀ*Õ.MÐN`Õ.aÓbÐØ#×0Ñ0ˆDÜŸš DÓ)ˆJÙ#3°FÓ#GˆE�N‰N˜4Ñ Ü'¨Ó;Šñ /ð €Ló    c                óT   € V ^8„  d   QhR\         \        ,          R,          R\        /# )é   Ú
device_mapNÚreturn)ÚstrÚdictÚbool)Úformats   "r*   Ú__annotate__r4   8   s)   € ÷ ?ñ ?ô ”d•
˜TÕ!ð	?ô
 
ñ?r+   c                ó&  € ^ RI Hp ^ RIHp V! VP                  VP
                  RRVP                  VP                  VVP                  VP                  RR7
      pV P                  4        Fð  w  rx\        Wq4      '       g   K  \        P                  ! R4      ;_uu_ 4        \        V\        P                   4      '       d’   V! VP                  VP"                  VP$                  VP
                  VP&                  VP(                  VP*                  RJVP,                  P                  RR7	      p	V	P/                  R4       V P1                  Wy4       Rp
RRR4       Kò  	  X
'       g   \2        P5                  R	4       V #   + '       g   i     EK%  ; i)
a¶  
Public method that replaces the linear layers of the given model with awq quantized layers.

Args:
    model (`torch.nn.Module`):
        The model to convert, can be any `torch.nn.Module` instance.
    quantization_config (`AwqConfig`):
        The quantization config object that contains the quantization parameters.
    modules_to_not_convert (`list[str]`, *optional*, defaults to `None`):
        A list of nn.Linear weights to not convert. If a parameter path is in the list (e.g. `lm_head.weight`), the corresponding module will not be
        converted.
    device_map (`Union[str, dict]`, *optional*, defaults to `None`):
        The device map that maps the parameters to the device
)ÚMETHOD)Úhf_select_quant_linear_v2F)
ÚbitsÚ
group_sizeÚdesc_actÚsymr3   Úbackendr.   Úquant_methodÚ
zero_pointÚpackÚmetaNT)	r8   r;   r:   r9   Úin_featuresr   ÚbiasÚdevÚregister_buffersz»You are loading your model using eetq but no linear modules were found in your model. Please double check your model architecture, or submit an issue on github if you think this is a bug.)Úgptqmodel.quantizationr6   Úgptqmodel.utils.importerr7   r8   r9   r3   r<   ÚAWQr>   Únamed_modulesr   r   ÚdeviceÚ
isinstanceÚnnÚLinearr;   r:   rA   r   rB   ÚweightÚrequires_grad_Úset_submoduleÚloggerÚwarning)r!   Úmodules_to_not_convertÚquantization_configr.   r6   r7   Ú
target_clsÚmodule_namer$   Ú
new_moduleÚhas_been_replaceds   &&&&       r*   Úreplace_with_awq_linearrX   8   sK  € õ( .ÝBá*Ø ×%Ñ%Ø&×1Ñ1ØØØ"×)Ñ)Ø#×+Ñ+ØØ—Z‘ZØ&×1Ñ1Øô€Jð  %×2Ñ2Ö4ÑˆÜ$ [×IÒIÙÜ�\Š\˜&×!Õ!Ü˜&¤"§)¡)×,Ò,Ù'Ø,×1Ñ1Ø+×/Ñ/Ø0×9Ñ9Ø2×=Ñ=Ø &× 2Ñ 2Ø!'×!4Ñ!4ØŸ™¨DÐ0ØŸ™×,Ñ,Ø%)ô
�
ð ×)Ñ)¨%Ô0Ø×#Ñ# KÔ<Ø$(Ð!÷ "Ñ!ñ  5÷( Ü�‰ðô	
ð €L÷1 "×!Ñ!ús   Â!B2E>Å>F)NNN)Ú__doc__Úquantizers.quantizers_utilsr   Úutilsr   r   r   Útorch.nnrK   Ú
get_loggerÚ__name__rP   r   r    rX   © r+   r*   Ú<module>r`      sÂ   ðñ >å ?ß /ñ ×ÒÛÝà	×	Ò	˜HÓ	%€ð �5˜%Ð!3°VÐ<Ø˜˜uÐ&8¸/ÐJØˆu�eÐ/°ÐAØ	ˆE�5Ð,¨iÐ8Ø
ˆU�EÐ-¨wÐ7Ø�˜Ð1°?ÐCØ�E˜5Ð"4°fÐ=Øˆe�[Ð"4°oÐFð	Ð ò÷"?ñ ?r+   