
    Z j(                         S SK Jr  SSKJr  SSKJr  SSKJrJr  SSK	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/rg)    )strict   )PreTrainedConfig)RopeParameters)auto_docstringlogging   )
AutoConfigzsesame/csm-1b)
checkpointc                     ^  \ rS rSr% SrSrSrS/rSS0rSr	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'   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&'   S'r#\\S('   S)r$\\-  S
-  \S*'   S'r%\\S+'   S
r&\S
-  \S,'   U 4S- jr'S.r(U =r)$ )/CsmDepthDecoderConfig   a  
backbone_hidden_size (`int`, *optional*, defaults to 2048):
    Dimension of the hidden representations of the backbone model used with this depth decoder.

Example:

```python
>>> from transformers import CsmDepthDecoder, CsmDepthDecoderConfig

>>> # Initializing a CsmDepthDecoder
>>> configuration = CsmDepthDecoderConfig()
>>> model = CsmDepthDecoderModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```csm_depth_decoder_modeldepth_decoder_configpast_key_valuescodebook_size
vocab_size    A    Nnum_codebooks   backbone_hidden_size  i   hidden_size    intermediate_size   num_hidden_layers   num_attention_headsr	   num_key_value_headssilu
hidden_act!   max_position_embeddings{Gz?initializer_rangeh㈵>rms_norm_epsT	use_cachepad_token_idbos_token_ideos_token_idrope_parametersFattention_bias        attention_dropoutmlp_biashead_dimc                   > UR                  SS5      (       a  [        S5      eU R                  c  U R                  U l        U R                  b  U R                  OU R
                  U R                  -  U l        [        TU ]  " S0 UD6  g )Ntie_word_embeddingsFzE`tie_word_embeddings=True` is not supported for CsmDepthDecoderConfig )pop
ValueErrorr!   r    r3   r   super__post_init__selfkwargs	__class__s     z/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/csm/configuration_csm.pyr:   #CsmDepthDecoderConfig.__post_init__M   su    ::+U33dee ##+'+'?'?D$)-)BHXHX\`\t\tHt''    )r3   r!   )*__name__
__module____qualname____firstlineno____doc__
model_typebase_config_keykeys_to_ignore_at_inferenceattribute_mapdefault_thetar   int__annotations__r   r   r   r   r   r    r!   r#   strr%   r'   floatr)   r*   boolr+   r,   r-   listr.   r   dictr/   r1   r2   r3   r:   __static_attributes____classcell__r>   s   @r?   r   r      sH   " +J,O#4"5M M "M3:" $#$JK!s!s  &'t'J#%S%#u#L%It#L#*##L#*#+/L#S	/D(/48O^d*T18 ND ,/us{T)/HdHcDj( (rA   r   c                   p  ^  \ rS rSr% SrSrSrS/rSr\	\
S.rSS	0r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'   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)'   Sr$\\"\   -  S-  \S*'   S"r%\S-  \S+'   S,r&\\"\   -  S-  \S-'   Sr'\(\)-  S-  \S.'   S/r*\\S0'   S1r+\\-  S-  \S2'   S/r,\\S3'   Sr-\S-  \S4'   S r.\S-  \S5'   Sr/\)\0-  S-  \S6'   Sr1\)\0-  S-  \S7'   U 4S8 jr2S9r3U =r4$ ):	CsmConfigX   aL  
codebook_pad_token_id (`int`, *optional*, defaults to 2050):
    Padding token id for codebook tokens.
codebook_eos_token_id (`int`, *optional*, defaults to 0):
    End of stream token id for codebook tokens.
audio_token_id (`int`, *optional*, defaults to 128002):
    Audio token id in the text input.
audio_eos_token_id (`int`, *optional*, defaults to 128003):
    End of stream token id for audio in the text input.
tie_codebooks_embeddings (`bool`, *optional*, defaults to `True`):
    Whether to tie the codebook tokens embeddings of the backbone model to the codebook tokens embeddings of the depth decoder.
depth_decoder_config (`CsmDepthDecoderConfig`, *optional*):
    Configuration for the depth decoder.
codec_config (`PreTrainedConfig`, *optional*):
    Configuration for the codec.

```python
>>> from transformers import CsmForConditionalGeneration, CsmConfig

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

>>> # Initializing a model
>>> model = CsmForConditionalGeneration(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```
csm
csm_configr   r   )codec_configr   r   r   r   Nr   r   i  text_vocab_sizer   r   r   r      r   r    r   r!   r"   r#   r%   r&   r'   r(   r)   Tr*   i r+   i  codebook_pad_token_idr   codebook_eos_token_idi  r,   r-   audio_token_idi audio_eos_token_idr.   Fr/   r0   r1   r2   r3   tie_codebooks_embeddingsr   r[   c                   > UR                  SS5      (       a  [        S5      eU R                  c%  [        5       U l        [        R                  S5        O9[        U R                  [        5      (       a  [        S0 U R                  D6U l        U R                  c1  [        R                  " S5      U l        [        R                  S5        OD[        U R                  [        5      (       a%  [        R                  " S0 U R                  D6U l        U R                  c  U R                  U l        U R                  b  U R                  OU R                  U R                  -  U l        SU l        [         TU ]D  " S0 UD6  g )Nr5   Fz9`tie_word_embeddings=True` is not supported for CsmConfigzAdepth_decoder_config is None, using default depth decoder config.mimiz9codec_config is None, using default audio encoder config.r6   )r7   r8   r   r   loggerinfo
isinstancerR   r[   r
   	for_modelr!   r    r3   r   r5   r9   r:   r;   s     r?   r:   CsmConfig.__post_init__   s#   ::+U33XYY$$,(=(?D%KK[\11488(=(Z@Y@Y(ZD%$ * 4 4V <DKKST))400 * 4 4 It7H7H ID##+'+'?'?D$)-)BHXHX\`\t\tHt#( ''rA   )r[   r   r3   r!   r5   )5rB   rC   rD   rE   rF   rG   rH   rI   rK   r
   r   sub_configsrJ   r   rL   rM   r   r\   r   r   r   r    r!   r#   rN   r%   r'   rO   r)   r*   rP   r+   r^   r_   rQ   r,   r-   r`   ra   r.   r   rR   r/   r1   r2   r3   rb   r   r   r[   r:   rS   rT   rU   s   @r?   rW   rW   X   s   < J"O#4"5M" 5K
 	M !#M3:"J!OS!K!s!s!!&'t'J#'S'#u#L%It%L#*%(,3:,453c?T15%L#*%+/L#S	/D(/!'NC$J'17d3i$.748O^d*T18 ND ,/us{T)/HdHcDj,0dTk0;?$!11D8?37L$))D07( (rA   rW   N)huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r   auto.configuration_autor
   
get_loggerrB   re   r   rW   __all__r6   rA   r?   <module>rr      s     / 3 1 , 0 
		H	% ?+8(, 8(  ,8(v ?+](  ](  ,](B rA   