o
    ٷi                     @   s~   d dl Z d dlmZmZmZ d dlmZ eeZdddddgdfde j	j
d	ee d
ededee dee de j	j
fddZdS )    N)CallableOptionalList)init_loggeraoTembedderembedmodule
quant_typebackendper_rowexclude_layers	filter_fnreturnc                 K   sp   t | tjjs	J |d u rd}td|  | dv r0ddlm} || f||||d|S t	d| d)	Nfloat8_weight_onlyz,quant_type is not specified, using default: )r   torchao   )quantize_ao)r
   r   r   r   z	backend: z is not supported now!)

isinstancetorchnnModuleloggerwarninglowerr   r   
ValueError)r	   r
   r   r   r   r   kwargsr    r   O/home/ubuntu/.local/lib/python3.10/site-packages/cache_dit/quantize/__init__.pyquantize   s"   	r   )r   typingr   r   r   cache_dit.loggerr   __name__r   r   r   strboolr   r   r   r   r   <module>   s4    
