
    Z j                         S r SSKJ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Dia model configuration    )strict   )PreTrainedConfig)RopeParameters)auto_docstringloggingznari-labs/Dia-1.6B)
checkpointc                       \ 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'   Sr\\S'   Srg)DiaEncoderConfig   dia_encoder   max_position_embeddings   num_hidden_layershidden_size   num_attention_headsnum_key_value_heads   head_dimi   intermediate_sizeh㈵>norm_eps   
vocab_sizesilu
hidden_actNrope_parameters{Gz?initializer_range )__name__
__module____qualname____firstlineno__
model_typer   int__annotations__r   r   r   r   r   r   r   floatr   r   strr   dictr!   __static_attributes__r"       z/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/dia/configuration_dia.pyr   r      s     J#'S'sK!!!!Hc!s!HeJJ#'OTD['#u#r.   r   c                   |   \ 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r\\S'   Sr\\-  S-  \S '   S!r\\S"'   S#r\\S$'   S#r\\S%'   S&r \S-  \S''   Sr!\\"\   -  S-  \S('   S)r#\S-  \S*'   S+r$g),DiaDecoderConfig-   a  
cross_num_attention_heads (`int`, *optional*, defaults to 16):
    Number of attention heads for each cross-attention layer in the Transformer decoder.
cross_head_dim (`int`, *optional*, defaults to 128):
    Dimensionality of the cross-attention head.
cross_num_key_value_heads (`int`, *optional*, defaults to 16):
    Number of key and value heads for each cross-attention layer in the Transformer decoder.
cross_hidden_size (`int`, *optional*, defaults to 1024):
    Dimensionality of the cross-attention layers.
dia_decoderi   r      r   i   r   i    r   r   r      r   r   r   cross_num_attention_headscross_head_dimcross_num_key_value_headsr   cross_hidden_sizer   r   i  r   r   r   	   num_channelsNr   r    r!   T	use_cacheis_encoder_decoderi  pad_token_ideos_token_idi  bos_token_idr"   )%r#   r$   r%   r&   __doc__r'   r   r(   r)   r   r   r   r   r   r   r6   r7   r8   r9   r   r*   r   r   r+   r;   r   r   r,   r!   r<   boolr=   r>   r?   listr@   r-   r"   r.   r/   r1   r1   -   s   	 J#'S'sK!s!!!  Hc%'s'NC%'s'!s!HeJJL#48O^d*T18#u#It###L#*#+/L#S	/D(/#L#*#r.   r1   c                     ^  \ rS 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'   Sr\\\   -  S-  \S'   Sr\S-  \S'   Sr\\   S-  \S'   Sr\\S'   Sr\\S'   U 4S jrS rS rSrU =r$ )	DiaConfigU   a  
delay_pattern (`list[int]`, *optional*, defaults to `[0, 8, 9, 10, 11, 12, 13, 14, 15]`):
    The delay pattern for the decoder. The length of this list must match `decoder_config.num_channels`.

Example:

```python
>>> from transformers import DiaConfig, DiaModel

>>> # Initializing a DiaConfig with default values
>>> configuration = DiaConfig()

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

>>> # Accessing the model configuration
>>> configuration = model.config
```
diapast_key_values)encoder_configdecoder_configNrI   rJ   r   r   Tr=   r>   r?   r@   delay_patternr    r!   r<   c                 \  > [        U R                  [        5      (       a  [        S0 U R                  D6U l        [        U R                  [        5      (       a  [        S0 U R                  D6U l        U R                  b  U R                  O	[        5       U l        U R                  b  U R                  O	[        5       U l        U R                  b  U R                  O/ SQU l        U R                  b0  [        R                  S5        U R                  U R                  l        U R                  b0  [        R                  S5        U R                  U R                  l
        U R                  b0  [        R                  S5        U R                  U R                  l        [        TU ]4  " S0 UD6  g )N)	r      r:   
      r            zjPassing `pad_token_id` to `DiaConfig` is deprecated. Please set it directly on `DiaDecoderConfig` instead.zjPassing `eos_token_id` to `DiaConfig` is deprecated. Please set it directly on `DiaDecoderConfig` instead.zjPassing `bos_token_id` to `DiaConfig` is deprecated. Please set it directly on `DiaDecoderConfig` instead.r"   )
isinstancerI   r,   r   rJ   r1   rK   r>   loggerwarning_oncer?   r@   super__post_init__)selfkwargs	__class__s     r/   rW   DiaConfig.__post_init__{   sf   d))400"2"IT5H5H"IDd))400"2"IT5H5H"ID595H5H5Td11ZjZl595H5H5Td11ZjZl"&"4"4"@DFg 	
 (H 04/@/@D,(H 04/@/@D,(H 04/@/@D,''r.   c                 t    U R                   R                  [        U R                  5      :w  a  [	        S5      eg)zOPart of `@strict`-powered validation. Validates the architecture of the config.z3Number of channels must match delay pattern length.N)rJ   r;   lenrK   
ValueError)rX   s    r/   validate_architectureDiaConfig.validate_architecture   s3    ++s43E3E/FFRSS Gr.   c                     U R                   $ )z^Defaulting to audio config as it's the decoder in this case which is usually the text backbone)rJ   )rX   argsrY   s      r/   get_text_configDiaConfig.get_text_config   s    """r.   )rJ   rK   rI   )r#   r$   r%   r&   rA   r'   keys_to_ignore_at_inferencer   r1   sub_configsrI   r,   r)   rJ   r   r*   r=   rB   r>   r(   r?   rC   r@   rK   r!   r<   rW   r_   rc   r-   __classcell__)rZ   s   @r/   rE   rE   U   s    ( J#4"5%5IYZK59N$t+d2959N$t+d29He###L#*#+/L#S	/D(/#L#*#&*M49t#*#u#It"(HT
# #r.   rE   )rE   r   r1   N)rA   huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r   
get_loggerr#   rT   r   r1   rE   __all__r"   r.   r/   <module>rn      s     . 3 1 , 
		H	% /0$' $  1$" /0#$' #$  1#$L /0O#  O#  1O#d @r.   