
    -`i	                         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e G d d                                  ZdS )	    )AnyLiteral)field_validator)	dataclass)config)AttentionBackendEnumc                      e Zd ZU dZdZedz  ed<   	 dZed         dz  ed<   	 dZ	e
ed<   	 dZeed	<   	 dZe
ed
<   	 dZe
ed<   	 dZe
dz  ed<   	 dZe
ed<   	 dZe
ed<   	 defdZ edd          ededefd                        ZdS )AttentionConfigz/Configuration for attention mechanisms in vLLM.Nbackend)      flash_attn_versionFuse_prefill_decode_attention    (flash_attn_max_num_splits_for_cuda_graphuse_cudnn_prefillT"use_trtllm_ragged_deepseek_prefilluse_trtllm_attentiondisable_flashinfer_prefill!disable_flashinfer_q_quantizationreturnc                 D    ddl m}m} g } || |          } ||          S )a$  
        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.
        r   )get_hash_factorshash_factors)vllm.config.utilsr   r   )selfr   r   ignored_factorsfactorss        i/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/vllm/config/attention.pycompute_hashzAttentionConfig.compute_hash0   sD     	EDDDDDDD%'""499|G$$$    before)modevaluec                 n    t          |t                    rt          |                                         S |S )z6Enable parsing of the `backend` enum type from string.)
isinstancestrr   upper)clsr$   s     r   validate_backend_beforez'AttentionConfig.validate_backend_before>   s.     eS!! 	7'66r!   )__name__
__module____qualname____doc__r   r   __annotations__r   r   r   boolr   intr   r   r   r   r   r'   r    r   classmethodr   r*    r!   r   r
   r
      sT         :9+/G!D(///L/3,333: */ $..." 57,c666B#t###'/3&3338(,$+,,,P (-,,,0.3%t333>%c % % % % _YX...C C    [ /.  r!   r
   N)typingr   r   pydanticr   pydantic.dataclassesr   r   r   #vllm.v1.attention.backends.registryr   r
   r3   r!   r   <module>r8      s             $ $ $ $ $ $ * * * * * * $ $ $ $ $ $ D D D D D D 
5 5 5 5 5 5 5  5 5 5r!   