o
    ß¥µiV
  ã                   @   s8   d Z ddlmZ ddlmZ e ¡ ZG dd„ deƒZdS )z ChatGLM model configuration é    )ÚPretrainedConfig)Úloggerc                       sT   e Zd ZdZ												
															d‡ fdd„	Z‡  ZS )ÚChatGLM2ConfigÚchatglmé   é þ  é   é€5  é€   é    é   ç        çñhãˆµøä>TFé   r   Nç      ð?c                    s²   || _ || _|| _|| _|| _|| _|| _|| _|| _|	| _	|
| _
|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _|| _tƒ jdi |¤Ž d S )N© )Ú
num_layersÚ
vocab_sizeÚpadded_vocab_sizeÚhidden_sizeÚffn_hidden_sizeÚkv_channelsÚnum_attention_headsÚ
seq_lengthÚ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_attentionÚmulti_query_group_numÚapply_query_key_layer_scalingÚattention_softmax_in_fp32Úfp32_residual_connectionÚquantization_bitÚpre_seq_lenÚprefix_projectionÚ
rope_ratioÚ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   ú`/home/ubuntu/.local/lib/python3.10/site-packages/modelscope/models/nlp/chatglm2/configuration.pyr-      s6   zChatGLM2Config.__init__)r   r   r   r	   r
   r   r   r   r   r   TFTFFTFr   TTFr   NFr   )Ú__name__Ú
__module__Ú__qualname__Ú
model_typer-   Ú__classcell__r   r   r0   r2   r   
   s8    çr   N)Ú__doc__Útransformersr   Úmodelscope.utilsr   ÚloggingÚ
get_loggerr   r   r   r   r2   Ú<module>   s
    