+
    QV-jê  ã                   óŒ   € R t ^RIHt ^RIHtHtHt ]! 4       '       d   ^ RIt^ RIH	t	 ]P                  ! ]4      tRR R lltR# )z7SpQR (Sparse-Quantized Representation) integration file)Úshould_convert_module)Úis_spqr_availableÚ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/spqr.pyÚ__annotate__r      s   € ÷ /ñ /¼DÄ½IÈÕ<Lñ /ó    c                óæ  € \        4       '       d   ^ RIHp RpV P                  4        EF  w  rV\	        WQ4      '       g   K  \
        P                  ! R4      ;_uu_ 4        \        V\        P                  4      '       d²   VP                  pXP                  VP                  VP                  VP                  VP                  VP                   Wu R2,          Wu R2,          Wu R2,          Wu R2,          R7	      pV P"                  V,          P%                  R4       V P'                  WX4       R	pR
R
R
4       EK  	  V'       g   \(        P+                  R4       V #   + '       g   i     EKG  ; 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 (`SpQRConfig`):
        The quantization config object that contains the quantization parameters.
)ÚQuantizedLinearFÚmetaz.dense_weights.shapez.row_offsets.shapez.col_vals.shapez.in_perm.shape)	ÚrowsÚcolsÚbitsÚbeta1Úbeta2Údense_weights_shapeÚrow_offsets_shapeÚcol_vals_shapeÚin_perm_shapeTNz»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.)r   Ú
spqr_quantr   Únamed_modulesr   ÚtorchÚdeviceÚ
isinstanceÚnnÚLinearÚshapesÚcreate_placehodlerÚout_featuresÚin_featuresr   r   r   Ú_modulesÚrequires_grad_Úset_submoduleÚloggerÚwarning)	Úmodelr   Úquantization_configr   Úhas_been_replacedÚmodule_nameÚmoduler"   Ú
new_modules	   &&&      r   Úreplace_with_spqr_linearr1      s<  € ô ×ÒÝ.àÐà$×2Ñ2×4ÑˆÜ$ [×IÒIÙÜ�\Š\˜&×!Õ!Ü˜&¤"§)¡)×,Ò,Ø,×3Ñ3�à,×?Ñ?Ø×,Ñ,Ø×+Ñ+Ø,×1Ñ1Ø-×3Ñ3Ø-×3Ñ3Ø(.°Ð>RÐ/SÕ(TØ&,¨}Ð<NÐ-OÕ&PØ#)¨M¸Ð*IÕ#JØ"(¨=¸Ð)GÕ"Hð @ó 
�
ð —‘˜{Õ+×:Ñ:¸5ÔAØ×#Ñ# KÔ<Ø$(Ð!÷% "Ò!ñ  5÷, Ü�‰ðô	
ð €L÷5 "×!Ñ!ús   Á CEÅE0)NN)Ú__doc__Úquantizers.quantizers_utilsr   Úutilsr   r   r   r   Útorch.nnr    Ú
get_loggerÚ__name__r)   r1   © r   r   Ú<module>r9      s>   ðñ :å ?ß BÑ Bñ ×ÒÛÝà	×	Ò	˜HÓ	%€÷/ñ /r   