+
    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# )z?AQLM (Additive Quantization of Language Model) 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/aqlm.pyÚ__annotate__r      s   € ÷ +ñ +¼DÄ½IÈÕ<Lñ +ó    c                óv  € ^ RI Hp RpV P                  4        Fê  w  rV\        WQ4      '       g   K  \        P
                  ! R4      ;_uu_ 4        \        V\        P                  4      '       dŒ   V! VP                  VP                  VP                  RJVP                  VP                  VP                  VP                  R7      p\!        V4      Vn        VP%                  R4       V P'                  WW4       RpRRR4       Kì  	  V'       g   \(        P+                  R4       V #   + '       g   i     EK  ; i)aA  
Public method that recursively replaces the Linear layers of the given model with AQLM 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 (`AqlmConfig`):
        The quantization config object that contains the quantization parameters.
)ÚQuantizedLinearFÚmetaN)ÚbiasÚin_group_sizeÚout_group_sizeÚnum_codebooksÚnbits_per_codebookTz»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.)Úaqlmr   Únamed_modulesr   ÚtorchÚdeviceÚ
isinstanceÚnnÚLinearÚin_featuresÚout_featuresr   r   r   r   r   ÚtypeÚ
source_clsÚrequires_grad_Úset_submoduleÚloggerÚwarning)Úmodelr   Úquantization_configr   Úhas_been_replacedÚmodule_nameÚmoduleÚ
new_modules   &&&     r   Úreplace_with_aqlm_linearr+      sþ   € õ %àÐà$×2Ñ2Ö4ÑˆÜ$ [×IÒIÙÜ�\Š\˜&×!Õ!Ü˜&¤"§)¡)×,Ò,Ù,Ø×&Ñ&Ø×'Ñ'ØŸ™¨DÐ0Ø"5×"CÑ"CØ#6×#EÑ#EØ"5×"CÑ"CØ':×'MÑ'Mô�
ô )-¨V«�
Ô%Ø×)Ñ)¨%Ô0Ø×#Ñ# KÔ<Ø$(Ð!÷ "Ñ!ñ  5÷& Ü�‰ðô	
ð €L÷/ "×!Ñ!ús   ÁB,D&Ä&D8)NN)Ú__doc__Úquantizers.quantizers_utilsr   Úutilsr   r   r   Útorch.nnr   Ú
get_loggerÚ__name__r#   r+   © r   r   Ú<module>r3      s<   ðñ Bå ?ß /ñ ×ÒÛÝà	×	Ò	˜HÓ	%€÷+ñ +r   