o
    ‰dËi´  ã                   @   sR   d dl Z d dlmZmZ d dlmZ d dlmZmZ e  	e
¡ZG dd„ deƒZdS )é    N)ÚABCÚabstractmethod)ÚPath)ÚOptionalÚUnionc                   @   sV   e Zd Ze	d
deeef dee fdd„ƒZe	d
deeef dee fdd	„ƒZ
dS )ÚOptimumQuantizerNÚmodel_or_pathÚ	file_namec                 C   s   t dƒ‚)zROverwrite this method in subclass to define how to load your model from pretrainedzcOverwrite this method in subclass to define how to load your model from pretrained for quantization©ÚNotImplementedError)Úclsr   r	   © r   úg/lsinfo/ai/hellotax_ai/llm_service/venv_embed/lib/python3.10/site-packages/optimum/quantization_base.pyÚfrom_pretrained   s   ÿz OptimumQuantizer.from_pretrainedÚsave_dirÚfile_prefixc                 K   s   t d ƒ‚)zWOverwrite this method in subclass to define how to quantize your model for quantizationr
   )Úselfr   r   Úkwargsr   r   r   Úquantize   s   ÿzOptimumQuantizer.quantize)N)Ú__name__Ú
__module__Ú__qualname__Úclassmethodr   Ústrr   r   r   r   r   r   r   r   r   r   
   s    ý
þý
&r   )ÚloggingÚabcr   r   Úpathlibr   Útypingr   r   Ú	getLoggerr   Úloggerr   r   r   r   r   Ú<module>   s    
