
    i                     r    d dl mZ ddlmZ ddlmZ ddlmZ  ed      e G d d	e                    Zd	gZ	y
)    )strict   )PreTrainedConfig)RopeParameters)auto_docstringzTHUDM/glm-4-9b-chat)
checkpointc                       e Zd ZU dZdZdgZdddddddZd	gd
gfddgdgfdgdgfdZdZe	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	dz  e
d<   dZee
d<   dZee	z  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e
d*<   dZeez  dz  e
d+<   d,Ze	dz  e
d-<   dZe	e e	   z  dz  e
d.<   dZ!e	dz  e
d/<   d'Z"ee
d0<    fd1Z# xZ$S )2	GlmConfiga  
    Example:

    ```python
    >>> from transformers import GlmModel, GlmConfig
    >>> # Initializing a Glm glm-4-9b-chat style configuration
    >>> configuration = GlmConfig()
    >>> # Initializing a model from the glm-4-9b-chat style configuration
    >>> model = GlmModel(configuration)
    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```glmpast_key_valuescolwiserowwisecolwise_gather_outputrowwise_split_input)zlayers.*.self_attn.q_projzlayers.*.self_attn.k_projzlayers.*.self_attn.v_projzlayers.*.self_attn.o_projzlayers.*.mlp.gate_up_projzlayers.*.mlp.down_proj	input_idsinputs_embedshidden_statesattention_mask)embed_tokenslayersnormi P 
vocab_sizei   hidden_sizei5  intermediate_size(   num_hidden_layers    num_attention_heads   Nnum_key_value_heads   head_dimsilu
hidden_actg        attention_dropouti   max_position_embeddingsg{Gz?initializer_rangegh㈵>rms_norm_epsT	use_cacheFtie_word_embeddingsrope_parameters!O pad_token_ideos_token_idbos_token_idattention_biasc                 r    |j                  dd       | j                  	g d| _        t        |   di | y )Npartial_rotary_factorg      ?)r,   i(O i*O  )
setdefaultr.   super__post_init__)selfkwargs	__class__s     z/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/glm/configuration_glm.pyr6   zGlmConfig.__post_init__L   s8    137$ 8D''    )%__name__
__module____qualname____doc__
model_typekeys_to_ignore_at_inferencebase_model_tp_planbase_model_pp_planr   int__annotations__r   r   r   r   r    r"   r$   strr%   floatr&   r'   r(   r)   boolr*   r+   r   dictr-   r.   listr/   r0   r6   __classcell__)r9   s   @r:   r
   r
      sj    J#4"5%.%.%.%.%<"7 &(9:#%568IJ!"_$56 JK"s"s!!&'t'HcDjJ,/us{T)/#)S)#u#'L%'It %%48O^d*T18%L#*%+/L#S	/D(/#L#*#ND( (r;   r
   N)
huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r
   __all__r3   r;   r:   <module>rQ      sG   " / 3 1 # 016(  6(  26(r -r;   