o
    پiA                     @   sd   d dl mZmZ d dlmZ d dlmZmZ d dlm	Z	 eG dd deZ
eG dd deZd	S )
    )	dataclassfield)Any)
ArchConfigModelConfig)AttentionBackendEnumc                   @   s   e Zd ZU eedZeed< eedZeed< eedZ	eed< eedZ
eed< edd dZee ed< d	Zeed
< d	Zeed< d	Zeed< eedZee ed< dZedB ed< dddZdS )AdapterArchConfigdefault_factory_fsdp_shard_conditions_compile_conditionsparam_names_mappingreverse_param_names_mappingc                   C   s$   t jt jt jt jt jt jt jt jhS N)	r   SLIDING_TILE_ATTN	SAGE_ATTNFAAITER
TORCH_SDPAVIDEO_SPARSE_ATTN
VMOBA_ATTNSAGE_ATTN_3 r   r   e/home/ubuntu/.local/lib/python3.10/site-packages/sglang/multimodal_gen/configs/models/adapter/base.py<lambda>   s   zAdapterArchConfig.<lambda>_supported_attention_backendsr   hidden_sizenum_attention_headsnum_channels_latentsexclude_lora_layersNboundary_ratioreturnc                 C   s   | j s| j | _ d S d S r   )r   r   copy)selfr   r   r   __post_init__&   s   zAdapterArchConfig.__post_init__)r!   N)__name__
__module____qualname__r   listr   __annotations__r   dictr   r   r   setr   r   intr   r   r   strr    floatr$   r   r   r   r   r   	   s   
 r   c                   @   sH   e Zd ZU eedZeed< dZeed< e	dde
dede
fdd	Zd
S )AdapterConfigr	   arch_config prefix
dit-configparserr!   c                 C   s0   | j d| dt|dd dtjdd | S )z*Add CLI arguments for AdapterConfig fieldsz--z.prefix-_zPrefix for the Adapter)typedestdefaulthelp)add_argumentr-   replacer/   r2   )r4   r2   r   r   r   add_cli_args2   s   
zAdapterConfig.add_cli_argsN)r3   )r%   r&   r'   r   r   r0   r)   r2   r-   staticmethodr   r=   r   r   r   r   r/   +   s
   
 r/   N)dataclassesr   r   typingr   )sglang.multimodal_gen.configs.models.baser   r   'sglang.multimodal_gen.runtime.platformsr   r   r/   r   r   r   r   <module>   s   !