o
    ÔÙ¾i[  ã                   @   s    d dl mZ G dd„ deƒZdS )é    )ÚPretrainedConfigc                       s^   e Zd ZdZdddœZ							
																			d‡ fdd„	Z‡  ZS )ÚChatGLMConfigÚchatglmÚ
num_layersÚmulti_query_group_num)Únum_hidden_layersÚ	n_head_kvé   é þ  é   é€5  é€   é    é   ç        çñhãˆµøä>TFé   r   Nc                    s¸   || _ || _|| _|| _|| _|| _|| _|| _|| _|| _	|	| _
|
| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _tƒ jdi |¤Ž d S )N© )r   Ú
vocab_sizeÚpadded_vocab_sizeÚhidden_sizeÚffn_hidden_sizeÚkv_channelsÚnum_attention_headsÚ
seq_lengthÚmax_position_embeddingsÚhidden_dropoutÚattention_dropoutÚlayernorm_epsilonÚrmsnormÚ(apply_residual_connection_post_layernormÚpost_layer_normÚadd_bias_linearÚadd_qkv_biasÚbias_dropout_fusionÚmulti_query_attentionr   Úapply_query_key_layer_scalingÚattention_softmax_in_fp32Úfp32_residual_connectionÚquantization_bitÚpre_seq_lenÚprefix_projectionÚinterleaved_qkvÚsuperÚ__init__)Úselfr   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r,   r$   r%   r   r&   r'   r(   r)   r*   r+   Úkwargs©Ú	__class__r   úN/home/ubuntu/.local/lib/python3.10/site-packages/sglang/srt/configs/chatglm.pyr.      s:   ÿzChatGLMConfig.__init__)r	   r
   r   r   r   r   r   r   r   r   TFTFFFTFr   TTFr   NF)Ú__name__Ú
__module__Ú__qualname__Ú
model_typeÚattribute_mapr.   Ú__classcell__r   r   r1   r3   r      s>    þær   N)Útransformersr   r   r   r   r   r3   Ú<module>   s   