+
    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 lltR# )z9VPTQ (Vector Post-Training Quantization) integration file)Úshould_convert_module)Úis_torch_availableÚloggingNc                óH   € V ^8„  d   QhR\         \        ,          R,          /# )é   Úmodules_to_not_convertN)ÚlistÚstr)Úformats   "Úo/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/transformers/integrations/vptq.pyÚ__annotate__r      s   € ÷ 7ñ 7¼DÄ½IÈÕ<Lñ 7ó    c                ól  € ^ RI Hp RpVP                  pVP                  pV P	                  4        EFL  w  rx\        Wq4      '       g   K  \        P                  ! R4      ;_uu_ 4        \        V\        P                  4      '       dí   VP                  VR4      ;'       g)    VP                  VP                  R4      ^,          R4      p	V! VP                  VP                  V	R,          V	R,          V	R,          V	R	,          V	R
,          V	R,          V	R,          V	R,          V	R,          RRVP                  RJR7      p
V P                   V,          P#                  R4       V P%                  Wz4       RpRRR4       EKO  	  V'       g   \&        P)                  R4       V #   + '       g   i     EK‚  ; i)a5  
Public method that replaces the Linear layers of the given model with SPQR quantized layers.

Args:
    model (`torch.nn.Module`):
        The model to convert, can be any `torch.nn.Module` instance.
    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.
    quantization_config (`VptqConfig`):
        The quantization config object that contains the quantization parameters.
)ÚVQuantLinearFÚmetaNÚ.Úvector_lensÚnum_centroidsÚnum_res_centroidsÚ	group_numÚ
group_sizeÚoutlier_sizeÚindices_as_floatÚenable_normÚenable_permT)r   r   r   r   r   r   r   r   r   Úis_indice_packedÚenable_proxy_errorÚbiasz»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.)Úvptqr   Úshared_layer_configÚconfig_for_layersÚnamed_modulesr   ÚtorchÚdeviceÚ
isinstanceÚnnÚLinearÚgetÚrsplitÚin_featuresÚout_featuresr   Ú_modulesÚrequires_grad_Úset_submoduleÚloggerÚwarning)Úmodelr   Úquantization_configr   Úhas_been_replacedr   r    Úmodule_nameÚmoduleÚlayer_paramsÚ
new_modules   &&&        r   Úreplace_with_vptq_linearr7      s‚  € õ "àÐØ-×AÑAÐØ+×=Ñ=Ðà$×2Ñ2×4ÑˆÜ$ [×IÒIÙÜ�\Š\˜&×!Õ!Ü˜&¤"§)¡)×,Ò,Ø0×4Ñ4°[À$ÓG÷  ð  ÐK^×KbÑKbØ×&Ñ& sÓ+¨AÕ.°óL�ñ *Ø×&Ñ&Ø×'Ñ'Ø ,¨]Õ ;Ø".¨Õ"?Ø&2Ð3FÕ&GØ*¨;Õ7Ø+¨LÕ9Ø!-¨nÕ!=Ø%1Ð2DÕ%EØ ,¨]Õ ;Ø ,¨]Õ ;Ø%)Ø',ØŸ™¨DÐ0ô�
ð" —‘˜{Õ+×:Ñ:¸5ÔAØ×#Ñ# KÔ<Ø$(Ð!÷1 "Ò!ñ  5÷: Ü�‰ðô	
ð €L÷C "×!Ñ!ús   Á(9F!Â"CF!Æ!F3)NN)Ú__doc__Úquantizers.quantizers_utilsr   Úutilsr   r   r"   Útorch.nnr%   Ú
get_loggerÚ__name__r.   r7   © r   r   Ú<module>r?      s;   ðñ <å ?ß /ñ ×ÒÛÝà	×	Ò	˜HÓ	%€÷7ñ 7r   