
    -`iw                         d dl mZmZ d dlmZmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ erd dlmZ d dlmZ neZeZ ee          Ze	e G d	 d
                                  ZdS )    )TYPE_CHECKINGAny)Fieldfield_validator)	dataclass)config)init_logger)	safe_hash)LoadFormats)TensorizerConfigc                      e Zd ZU dZdZeez  ed<   	 dZedz  ed<   	 dZ	eed<   	  e
e          Zeez  ed	<   	 dZedz  ed
<   	  e
d           Zee         ez  ed<   	 dZeed<   	 dZeeeef         z  ed<   	 defdZ edd          dedefd            Z edd          dee         ez  dee         ez  fd            ZdS )
LoadConfigz,Configuration for loading the model weights.autoload_formatNdownload_dirlazysafetensors_load_strategy)default_factorymodel_loader_extra_configdevicec                      dgS )Noriginal/**/* r       d/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/config/load.py<lambda>zLoadConfig.<lambda>K   s	    oEV r   ignore_patternsTuse_tqdm_on_loadcpupt_load_map_locationreturnc                     g }t          t          |                                          d                                          }|S )a  
        WARNING: Whenever a new field is added to this config,
        ensure that it is included in the factors list if
        it affects the computation graph.

        Provide a hash that uniquely identifies all the configs
        that affect the structure of the computation
        graph from input ids/embeddings to the final hidden states,
        excluding anything before input ids/embeddings and after
        the final hidden states.
        F)usedforsecurity)r
   strencode	hexdigest)selffactorshash_strs      r   compute_hashzLoadConfig.compute_hash\   s>      S\\0022EJJJTTVVr   after)modec                 *    |                                 S )N)lower)clsr   s     r   _lowercase_load_formatz!LoadConfig._lowercase_load_formatn   s      """r   c                 p    |dgk    r.t          |          dk    rt                              d|           |S )Nr   r   z<Ignoring the following patterns when downloading weights: %s)lenloggerinfo)r/   r   s     r   _validate_ignore_patternsz$LoadConfig._validate_ignore_patternsr   sH     ///C4H4H14L4LKKN  
 r   )__name__
__module____qualname____doc__r   r$   r   __annotations__r   r   r   dictr   r   r   r   listr   boolr    r*   r   r0   r5   r   r   r   r   r      s         76%+K{"+++;0  $L#*###(%+s+++ :?t9T9T9Tt&66TTT0FC$J',u=V=V'W'W'WOT#Y_WWWI!d!!!16#S#X.666c    $ _]111# # # # # 21# _&W555	"3i#o		cS	 	 	 65	 	 	r   r   N)typingr   r   pydanticr   r   pydantic.dataclassesr   vllm.config.utilsr   vllm.loggerr	   vllm.utils.hashingr
    vllm.model_executor.model_loaderr   +vllm.model_executor.model_loader.tensorizerr   r6   r3   r   r   r   r   <module>rF      s   & % % % % % % % + + + + + + + + * * * * * * $ $ $ $ $ $ # # # # # # ( ( ( ( ( ( <<<<<<LLLLLLLK	X		 
c c c c c c c  c c cr   