+
    "Ý³j™  ã                   óŒ   € ^ RI t ^ RIHt ^ RIt^ RIHtHt ^ RIHt ]P                  3R R llt
R R ltRR	 R
 lltR R ltR# )é    N©ÚAny)ÚZeroPointDomainÚ_fake_quantize_affine)Ú_get_per_token_block_sizec                óÈ   € V ^8„  d   QhR\         P                  R\         P                  R\         P                  R\        R\        R\        R\        R\         P                  /# )	é   ÚinputÚscalesÚzero_pointsÚ	quant_minÚ	quant_maxÚ
group_sizeÚzero_point_domainÚreturn)ÚtorchÚTensorÚintr   )Úformats   "Ú_/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchao/quantization/qat/utils.pyÚ__annotate__r      sh   € ÷ ñ Ü�<‰<ðä�L‰Lðô —‘ðô ð	ô
 ðô ðô 'ðô ‡\�\ñó    c                 óÎ   € V^8”  g   Q hV P                   R,          V,          ^ 8X  g   Q hV P                  4       ^8X  g   Q h^V3p\        V VVV\        P                  VVVR7      # )é   )Úquant_dtyper   r   r   éÿÿÿÿ)ÚshapeÚdimr   r   Úint32)r
   r   r   r   r   r   r   Ú
block_sizes   &&&&&&& r   Ú _fake_quantize_per_channel_groupr!      sq   € ð ˜Œ>Ðˆ>Ø�;‰;�r�?˜ZÕ'¨1Ô,Ð,Ð,Ø�9‰9‹;˜!ÔÐÐØ�Z�€JÜ ØØØØÜ—K‘KØØØ+ô	ð 	r   c                ó°   € V ^8„  d   QhR\         P                  R\         P                  R\         P                  R\        R\        R\         P                  /# )r	   r
   r   r   r   r   r   )r   r   r   )r   s   "r   r   r   .   sT   € ÷ 0ñ 0Ü�<‰<ð0ä�L‰Lð0ô —‘ð0ô ð	0ô
 ð0ô ‡\�\ñ0r   c           
      óÊ   € ^ RI Hp V! WV4       \        V 4      p\        V VVV\        P
                  VVR7      pVP                  V 4      P                  V P                  4      # )r   )Ú!_per_token_quant_qparam_dim_check)r   r   r   )	Ú$torch.ao.quantization.fx._decomposedr$   r   r   r   r   Ú
reshape_asÚtoÚdtype)r
   r   r   r   r   r$   r    Úfqs   &&&&&   r   Ú_fake_quantize_per_tokenr*   .   s_   € õ Wá% e°[ÔAÜ*¨5Ó1€JÜ	ØØØØÜ—K‘KØØô
€Bð �=‰=˜Ó×"Ñ" 5§;¡;Ó/Ð/r   c                ó0   € V ^8„  d   QhR\         R\        /# )r	   Ún_bitÚ	symmetric)r   Úbool)r   s   "r   r   r   E   s   € ÷ ñ œ#ð ¬$ñ r   c                 ó’   € V'       d,   ^V ^,
          ,          ) p^V ^,
          ,          ^,
          pW#3# ^ p^V ,          ^,
          pW#3# )r	   © )r,   r-   ÚqminÚqmaxs   &&  r   Ú_get_qmin_qmaxr3   E   sO   € ßØ�u˜q•yÕ!Ð"ˆØ�U˜Q•YÕ !Õ#ˆð ˆ<Ðð ˆØ�%�x˜!�|ˆØˆ<Ðr   c                ó$   € V ^8„  d   QhR\         /# )r	   Úold_api_objectr   )r   s   "r   r   r   O   s   € ÷ ñ ¬Sñ r   c                óh   € \         P                  ! RV P                  P                  ,          4       R# )zf
Log a helpful deprecation message pointing users to the new QAT API,
only once per deprecated class.
a  '%s' is deprecated and will be removed in a future release. Please use the following API instead:

    base_config = Int4WeightOnlyConfig(group_size=32)
    quantize_(model, QATConfig(base_config, step="prepare"))
    # train (not shown)
    quantize_(model, QATConfig(base_config, step="convert"))

Alternatively, if you prefer to pass in fake quantization configs:

    activation_config = IntxFakeQuantizeConfig(torch.int8, "per_token", is_symmetric=False)
    weight_config = IntxFakeQuantizeConfig(torch.int4, group_size=32)
    qat_config = QATConfig(
        activation_config=activation_config,
        weight_config=weight_config,
        step="prepare",
    )
    quantize_(model, qat_config)

Please see https://github.com/pytorch/ao/issues/2630 for more details.
        N)ÚwarningsÚwarnÚ	__class__Ú__name__)r5   s   &r   Ú_log_deprecation_warningr;   O   s+   € ô
 ‡M‚Mð	ð( ×
"Ñ
"×
+Ñ
+õ)	,ör   )T)r7   Útypingr   r   Ú%torchao.quantization.quant_primitivesr   r   Útorchao.quantization.utilsr   ÚINTr!   r*   r3   r;   r0   r   r   Ú<module>r@      s9   ðó Ý ã ÷õð *9×)<Ñ)<÷õ20÷.÷r   