Ë
    ÛÓ^j4  ã                   ó  — d Z ddlmZ ddlmZ ddlmZmZ  ej                  e	«      Z
 ed¬«      e G d„ d	e«      «       «       Z ed¬«      e G d
„ de«      «       «       Z ed¬«      e G d„ de«      «       «       Zg d¢Zy)zCLAP model configurationé    )Ústricté   )ÚPreTrainedConfig)Úauto_docstringÚloggingzlaion/clap-htsat-fused)Ú
checkpointc                   ó2  — e Zd ZU dZ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ed<   dZeed<   dZeez  ed<   dZee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dz  ed<   dZedz  ed<   d Zeee   z  dz  ed!<   d"Zeed#<   y)$ÚClapTextConfiga‹  
    Examples:

    ```python
    >>> from transformers import ClapTextConfig, ClapTextModel

    >>> # Initializing a CLAP text configuration
    >>> configuration = ClapTextConfig()

    >>> # Initializing a model (with random weights) from the configuration
    >>> model = ClapTextModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úclap_text_modelÚtext_configiYÄ  Ú
vocab_sizeé   Úhidden_sizeé   Únum_hidden_layersÚnum_attention_headsi   Úintermediate_sizeÚgeluÚ
hidden_actçš™™™™™¹?Úhidden_dropout_probÚattention_probs_dropout_probi  Úmax_position_embeddingsé   Útype_vocab_sizeç      ð?Úinitializer_factorgê-�™—q=Úlayer_norm_epsé   Úprojection_dimNÚpad_token_idr   Úbos_token_idé   Úeos_token_idÚreluÚprojection_hidden_act)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typeÚbase_config_keyr   ÚintÚ__annotations__r   r   r   r   r   Ústrr   Úfloatr   r   r   r   r   r    r!   r"   r$   Úlistr&   © ó    úv/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/clap/configuration_clap.pyr
   r
      sâ   … ñð  #€JØ#€Oà€J�ÓØ€K�ÓØÐ�sÓØ!Ð˜Ó!Ø!Ð�sÓ!Ø€J�ÓØ'*Ð˜ ™Ó*Ø03Ð  %¨#¡+Ó3Ø#&Ð˜SÓ&Ø€O�SÓØ #Ð˜Ó#Ø!€N�EÓ!Ø€N�CÓØ €L�#˜‘*Ó Ø €L�#˜‘*Ó Ø+,€L�#˜˜S™	‘/ DÑ(Ó,Ø!'Ð˜3Ô'r3   r
   c                   ó  — e Zd ZU dZ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ee   z  eeef   z  ed<   dZeee   z  eedf   z  ed<   dZeed<   dZeed<   dZeed<   dZee   eedf   z  ed<   dZee   eedf   z  ed<   dZeed<   dZeez  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ed'<   d(Zeez  ed)<   d(Z eez  ed*<   d#Z!eed+<   d,Z"eed-<   dZ#eed.<   dZ$eed/<   d0Z%eed1<   d2Z&eed3<   d4Z'eed5<   y)6ÚClapAudioConfigaê  
    window_size (`int`, *optional*, defaults to 8):
        Image size of the spectrogram
    spec_size (`int`, *optional*, defaults to 256):
        Desired input size of the spectrogram that the model supports. It can be different from the output of the
        `ClapFeatureExtractor`, in which case the input features will be resized. Corresponds to the `image_size`
        of the audio models.
    patch_stride (`list`, *optional*, defaults to `[4, 4]`):
        Patch stride for the audio spectrogram
    num_classes (`int`, *optional*, defaults to 527):
        Number of classes used for the head training
    enable_fusion (`bool`, *optional*, defaults to `False`):
        Whether or not to enable patch fusion. This is the main contribution of the authors, and should give the
        best results.
    fusion_type (`[type]`, *optional*):
        Fusion type used for the patch fusion.
    patch_embed_input_channels (`int`, *optional*, defaults to 1):
        Number of channels used for the input spectrogram
    flatten_patch_embeds (`bool`, *optional*, defaults to `True`):
        Whether or not to flatten the patch embeddings
    patch_embeds_hidden_size (`int`, *optional*, defaults to 96):
        Hidden size of the patch embeddings. It is used as the number of output channels.
    enable_patch_layer_norm (`bool`, *optional*, defaults to `True`):
        Whether or not to enable layer normalization for the patch embeddings
    aff_block_r (`int`, *optional*, defaults to 4):
        downsize_ratio used in the AudioFF block

    Example:

    ```python
    >>> from transformers import ClapAudioConfig, ClapAudioModel

    >>> # Initializing a ClapAudioConfig with laion/clap-htsat-fused style configuration
    >>> configuration = ClapAudioConfig()

    >>> # Initializing a ClapAudioModel (with random weights) from the laion/clap-htsat-fused style configuration
    >>> model = ClapAudioModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úclap_audio_modelÚaudio_configé   Úwindow_sizeé@   Únum_mel_binsé   Ú	spec_sizer   r   é   Ú
patch_size)r?   r?   .Úpatch_stridei  Únum_classesr   r   r   r    )r#   r#   é   r#   Údepths)r?   r9   é   é    r   FÚenable_fusionr   r   NÚfusion_typer   Úpatch_embed_input_channelsTÚflatten_patch_embedsé`   Úpatch_embeds_hidden_sizeÚenable_patch_layer_normg        Údrop_path_rater   Úqkv_biasg      @Ú	mlp_ratioÚaff_block_rr   r%   r&   gñhãˆµøä>r   r   r   )(r'   r(   r)   r*   r+   r,   r:   r-   r.   r<   r>   r   r/   r@   r1   ÚtuplerA   rB   r   r    rD   r   rG   Úboolr   r0   rH   rI   rJ   rL   rM   rN   r   rO   rP   rQ   r   r&   r   r   r2   r3   r4   r6   r6   B   sˆ  … ñ(ðT $€JØ$€Oà€K�ÓØ€L�#ÓØ€IˆsÓØ€J�ÓØ45€J��d˜3‘i‘ %¨¨S¨¡/Ñ1Ó5Ø6<€L�#˜˜S™	‘/ E¨#¨s¨(¡OÑ3Ó<Ø€K�ÓØ€K�ÓØ€N�CÓØ*6€FˆD�‰I˜˜c 3˜h™Ñ'Ó6Ø7EÐ˜˜c™ U¨3°¨8¡_Ñ4ÓEØ€M�4ÓØ'*Ð˜ ™Ó*Ø"€K��t‘Ó"Ø&'Ð Ó'Ø!%Ð˜$Ó%Ø$&Ð˜cÓ&Ø$(Ð˜TÓ(Ø"%€N�E˜C‘KÓ%Ø03Ð  %¨#¡+Ó3Ø€HˆdÓØ€IˆuÓØ€K�ÓØÐ�sÓØ!'Ð˜3Ó'Ø €N�EÓ Ø #Ð˜Ô#r3   r6   c                   óž   ‡ — e Zd ZU dZdZee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
<   dZeed<   dZeed<   ˆ fd„Zˆ xZS )Ú
ClapConfiga.  
    Example:

    ```python
    >>> from transformers import ClapConfig, ClapModel

    >>> # Initializing a ClapConfig with laion-ai/base style configuration
    >>> configuration = ClapConfig()

    >>> # Initializing a ClapModel (with random weights) from the laion-ai/base style configuration
    >>> model = ClapModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config

    >>> # We can also initialize a ClapConfig from a ClapTextConfig and a ClapAudioConfig
    >>> from transformers import ClapTextConfig, ClapAudioConfig

    >>> # Initializing a ClapText and ClapAudioConfig configuration
    >>> config_text = ClapTextConfig()
    >>> config_audio = ClapAudioConfig()

    >>> config = ClapConfig(text_config=config_text, audio_config=config_audio)
    ```Úclap)r   r8   Nr   r8   g$I’$I’,@Úlogit_scale_init_valuer   r    r%   r&   r   r   c                 ó<  •— | j                   €%t        «       | _         t        j                  d«       n4t	        | j                   t
        «      rt        di | j                   ¤Ž| _         | j                  €%t        «       | _        t        j                  d«       n4t	        | j                  t
        «      rt        di | j                  ¤Ž| _        | j                  | j                   _        | j                  | j                  _        | j                  | j                   _	        | j                  | j                  _	        | j                   j                  | _
        | j                   j                  t        | j                  j                  «      z   | _        t        ‰| �<  di |¤Ž y )NzO`text_config` is `None`. initializing the `ClapTextConfig` with default values.zQ`audio_config` is `None`. initializing the `ClapAudioConfig` with default values.r2   )r   r
   ÚloggerÚinfoÚ
isinstanceÚdictr8   r6   r    r&   r   r   ÚlenrD   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €r4   r_   zClapConfig.__post_init__µ   s5  ø€ Ø×ÑÐ#Ü-Ó/ˆDÔÜ�K‰KÐiÕjÜ˜×(Ñ(¬$Ô/Ü-ÑA°×0@Ñ0@ÑAˆDÔà×ÑÐ$Ü /Ó 1ˆDÔÜ�K‰KÐkÕlÜ˜×)Ñ)¬4Ô0Ü /Ñ D°$×2CÑ2CÑ DˆDÔà*.×*=Ñ*=ˆ×ÑÔ'Ø+/×+>Ñ+>ˆ×ÑÔ(à15×1KÑ1Kˆ×ÑÔ.Ø26×2LÑ2Lˆ×ÑÔ/Ø×+Ñ+×7Ñ7ˆÔØ!%×!1Ñ!1×!CÑ!CÄcÈ$×J[ÑJ[×JbÑJbÓFcÑ!cˆÔÜ‰ÑÑ' Ó'r3   )r'   r(   r)   r*   r+   r
   r6   Úsub_configsr   r\   r   r.   r8   rW   r0   r    r-   r&   r/   r   r_   Ú__classcell__)rb   s   @r4   rU   rU   �   sx   ø… ñð2 €JØ"0À/ÑR€Kà26€K�Ð(Ñ(¨4Ñ/Ó6Ø37€L�$Ð)Ñ)¨DÑ0Ó7Ø$,Ð˜EÓ,Ø€N�CÓØ!'Ð˜3Ó'Ø #Ð˜Ó#÷(ð (r3   rU   )r6   rU   r
   N)r*   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r   Ú
get_loggerr'   rY   r
   r6   rU   Ú__all__r2   r3   r4   ú<module>rj      s²   ðñ å .å 3ß ,ð 
ˆ×	Ñ	˜HÓ	%€ñ Ð3Ô4Øô$(Ð%ó $(ó ó 5ð$(ñN Ð3Ô4ØôH$Ð&ó H$ó ó 5ðH$ñV Ð3Ô4Øô8(Ð!ó 8(ó ó 5ð8(òv >�r3   