
    iC                         d dl mZ ddlmZ ddlmZ ddlmZmZ  ed      e G d	 d
e                    Z	 ed      e G d de                    Z
d
dgZy)    )strict   )PreTrainedConfig)auto_docstring   )CONFIG_MAPPING
AutoConfigzzai-org/GLM-ASR-Nano-2512)
checkpointc                        e Zd ZU dZ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dz  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z  ed<   dZeed<    fdZ xZS )GlmAsrEncoderConfiga  
    Example:

    ```python
    >>> from transformers import GlmAsrEncoderConfig, GlmAsrEncoder

    >>> # Initializing a GlmAsrEncoderConfig
    >>> configuration = GlmAsrEncoderConfig()

    >>> # Initializing a GlmAsrEncoder (with random weights)
    >>> model = GlmAsrEncoder(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```glmasr_encoderi   hidden_sizei   intermediate_size    num_hidden_layers   num_attention_headsNnum_key_value_headsgelu
hidden_acti  max_position_embeddingsg{Gz?initializer_rangerope_parametersg        attention_dropout   num_mel_binsc                     | j                   | j                  | _         |j                  dd       t        |   di | y )Npartial_rotary_factorg      ? )r   r   
setdefaultsuper__post_init__selfkwargs	__class__s     /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/glmasr/configuration_glmasr.pyr"   z!GlmAsrEncoderConfig.__post_init__8   s>    ##+'+'?'?D$137''    )__name__
__module____qualname____doc__
model_typer   int__annotations__r   r   r   r   r   strr   r   floatr   dictr   r   r"   __classcell__r&   s   @r'   r   r      s      "JK!s!s!!&*t*J#'S'#u##'OTD['%(us{(L#( (r(   r   c                        e Zd ZU dZdZeedZdddddd	d
ddg dddddZdZe	e
z  dz  ed<   dZe	e
z  dz  ed<   dZeed<   dZeed<    fdZ xZS )GlmAsrConfiga  
    Example:

    ```python
    >>> from transformers import GlmAsrForConditionalGeneration, GlmAsrConfig

    >>> # Initializing a glmasr configuration
    >>> configuration = GlmAsrConfig()

    >>> # Initializing a GLM-ASR-Nano-2512 model with random weights
    >>> model = GlmAsrForConditionalGeneration(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```glmasr)text_configaudio_configi  i   i            i    gh㈵>T)in  iu  iw  g     @default)
rope_theta	rope_type)
vocab_sizer   r   r   r   r   r   rms_norm_eps	use_cacheeos_token_idr   Nr9   r8   i|  audio_token_idr   projector_hidden_actc                    t        | j                  t              rT| j                  j                  dd      | j                  d<   t	        | j                  d      di | j                  | _        n| j                  t	        d          | _        t        | j
                  t              rb| j
                  j                  dd      | j
                  d<   t	        | j
                  d      di i | j                  | j
                  | _        n)| j
                  t	        d   di | j                  | _        t        |    di | y )Nr-   r   llamar   )	
isinstancer9   r2   getr   r8   _default_text_config_kwargsr!   r"   r#   s     r'   r"   zGlmAsrConfig.__post_init__i   s#   d''..2.?.?.C.CLRb.cDl+ .t/@/@/N O dRVRcRc dD& ./? @ BDd&&--1-=-=-A-A,PW-XD\*-d.>.>|.LM  JT55J9I9IJ D %-g6Z9Y9YZD''r(   )r)   r*   r+   r,   r-   r	   sub_configsrJ   r9   r2   r   r/   r8   rD   r.   rE   r0   r"   r3   r4   s   @r'   r6   r6   @   s      J",jIK !! #'-*1	J# 48L$))D0726K((4/6NC &#&( (r(   r6   N)huggingface_hub.dataclassesr   configuration_utilsr   utilsr   autor   r	   r   r6   __all__r   r(   r'   <module>rQ      su     / 3 # - 67$(* $(  8$(N 676(# 6(  86(r !.
1r(   