
    Z j4                         S r SSKJr  SSKJr  SSKJrJr  \R                  " \	5      r
\" SS9\ " S S	\5      5       5       r\" SS9\ " S
 S\5      5       5       r\" SS9\ " S S\5      5       5       r/ SQrg)zCLAP model configuration    )strict   )PreTrainedConfig)auto_docstringloggingzlaion/clap-htsat-fused)
checkpointc                   :   \ rS rSr% SrSrSrSr\\	S'   Sr
\\	S'   S	r\\	S
'   S	r\\	S'   Sr\\	S'   Sr\\	S'   Sr\\-  \	S'   Sr\\-  \	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\S-  \	S'   Sr\S-  \	S '   S!r\\\   -  S-  \	S"'   S#r\\	S$'   S%rg)&ClapTextConfig   ac  
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____firstlineno____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   r   strr   floatr   r   r   r   r   r!   r"   r#   r%   listr'   __static_attributes__r(       |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/clap/configuration_clap.pyr
   r
      s      #J#OJKs!!!s!J'**03 %#+3#&S&OS ##!NE!NC L#*  L#* +,L#S	/D(,!'3'r6   r
   c                      \ rS rSr% SrSrSrSr\\	S'   Sr
\\	S'   S	r\\	S
'   Sr\\	S'   Sr\\\   -  \\\4   -  \	S'   Sr\\\   -  \\S4   -  \	S'   Sr\\	S'   Sr\\	S'   Sr\\	S'   Sr\\   \\S4   -  \	S'   Sr\\   \\S4   -  \	S'   Sr\\	S'   Sr\\-  \	S'   S r\S -  \	S!'   S"r\\	S#'   S$r\\	S%'   S&r\\	S''   S$r\\	S('   S)r \\-  \	S*'   S)r!\\-  \	S+'   S$r"\\	S,'   S-r#\\	S.'   Sr$\\	S/'   Sr%\\	S0'   S1r&\\	S2'   S3r'\\	S4'   S5r(\\	S6'   S7r)g )8ClapAudioConfigB   a^  
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)rC   rC   .patch_stridei  num_classesr   r   r    r!   )r$   r$      r$   depths)rC   r=          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'   gh㈵>r   r   r   r(   )*r)   r*   r+   r,   r-   r.   r/   r>   r0   r1   r@   rB   r   r2   rD   r4   tuplerE   rF   r   r!   rH   r   rK   boolr   r3   rL   rM   rN   rP   rQ   rR   r   rS   rT   rU   r   r'   r   r   r5   r(   r6   r7   r9   r9   B   s   (T $J$OKL#IsJ45Jd3i%S/156<L#S	/E#s(O3<KKNC*6FDIc3h'67EcU38_4EM4'**"Kt"&''!%$%$&c&$(T("%NECK%03 %#+3HdIuKs!'3' NE  ##r6   r9   c                      ^  \ rS rSr% SrSr\\S.rSr	\
\-  S-  \S'   Sr\
\-  S-  \S'   Sr\\S	'   S
r\\S'   Sr\\S'   Sr\\S'   U 4S jrSrU =r$ )
ClapConfig   a  
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   r<   Nr   r<   g$I$I,@logit_scale_init_valuer    r!   r&   r'   r   r   c                 V  > U R                   c%  [        5       U l         [        R                  S5        O9[	        U R                   [
        5      (       a  [        S0 U R                   D6U l         U R                  c%  [        5       U l        [        R                  S5        O9[	        U R                  [
        5      (       a  [        S0 U R                  D6U l        U R                  U R                   l        U R                  U R                  l        U R                  U R                   l	        U R                  U R                  l	        U R                   R                  U l
        U R                   R                  [        U R                  R                  5      -   U l        [        TU ]<  " S0 UD6  g )NzO`text_config` is `None`. initializing the `ClapTextConfig` with default values.zQ`audio_config` is `None`. initializing the `ClapAudioConfig` with default values.r(   )r   r
   loggerinfo
isinstancedictr<   r9   r!   r'   r   r   lenrH   super__post_init__)selfkwargs	__class__s     r7   rd   ClapConfig.__post_init__   s;   #-/DKKij(($//-A0@0@AD$ / 1DKKkl))400 / D$2C2C DD*.*=*='+/+>+>(151K1K.262L2L/++77!%!1!1!C!Cc$J[J[JbJbFc!c''r6   )r<   r   r   r   )r)   r*   r+   r,   r-   r.   r
   r9   sub_configsr   ra   r   r1   r<   r\   r3   r!   r0   r'   r2   r   rd   r5   __classcell__)rg   s   @r7   rY   rY      sx    2 J"0/RK26K((4/637L$))D07$,E,NC!'3' ##( (r6   rY   )r9   rY   r
   N)r-   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr)   r^   r
   r9   rY   __all__r(   r6   r7   <module>rp      s     . 3 , 
		H	% 34$(% $(  5$(N 34H$& H$  5H$V 348(! 8(  58(v >r6   