
    Z j}                         S SK Jr  SSKJr  SSKJr  SSKJ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)    )strict   )PreTrainedConfig)RopeParameters)auto_docstringzEmu3-community/Emu3-Chat-hf)
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4   -  \	S'   Sr\\	S'   Sr\\   \\S4   -  \	S'   Sr\\	S'   Sr\\	S'   Sr\\-  \	S'   Srg )!Emu3VQVAEConfig   a  
embed_dim (`int`, *optional*, defaults to 4):
    Dimension of the quantized vector in codebook.
out_channels (`int`, *optional*, defaults to 3):
    Output channel of decoder.
temporal_downsample_factor (`int`, *optional*, defaults to 4):
    Temporal downsample factor.
base_channels (`int`, *optional*, defaults to 256):
    Basic channel number of the intermediate blocks.
channel_multiplier (`list[int]`, *optional*, defaults to `[1, 2, 2, 4]`):
    Channel scaling factor of the intermediate blocks.
num_res_blocks (`int`, *optional*, defaults to 2):
    Residual block number in each stage.
attn_resolutions (`list[int]`, *optional*, defaults to `[3]`):
    Stage indices to apply attention.

```python
>>> from transformers import Emu3VQVAE, Emu3VQVAEConfig

>>> # Initializing a video VQ model of Emu3 configuration
>>> configuration = Emu3VQVAEConfig()

>>> # Initializing a model from the Emu3 VQ model style configuration
>>> model = Emu3VQVAE(configuration)

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

emu3_vqgan	vq_configi   codebook_size   	embed_dimlatent_channelsFdouble_latentr   in_channelsout_channelstemporal_downsample_factor   base_channels)      r   r   .channel_multiplierr   num_res_blocks)r   attn_resolutionsi   hidden_sizer   num_attention_headsg        attention_dropout N)__name__
__module____qualname____firstlineno____doc__
model_typebase_config_keyr   int__annotations__r   r   r   boolr   r   r   r   r   listtupler   r   r   r   r   float__static_attributes__r        |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/emu3/configuration_emu3.pyr
   r
      s    < J!OM3IsOSM4KL#&''M36BS	E#s(O3BNC48d3i%S/18K  %(us{(r/   r
   c                   L   \ rS rS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'   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"r S#r!\\
-  \S$'   S%r"\\S&'   S"r#\\S''   S(r$g))Emu3TextConfigL   av  
Example:

```python
>>> from transformers import Emu3Model, Emu3Config

>>> # Initializing a Emu3-community/Emu3-Chat-hf style configuration
>>> configuration = Emu3Config()

>>> # Initializing a model from the Emu3-community/Emu3-Chat-hf style configuration
>>> model = Emu3Model(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```emu3_text_modeltext_configpast_key_valuesg    .Ai. 
vocab_sizei   r   i 8  intermediate_size    num_hidden_layersr      Nnum_key_value_headssilu
hidden_acti $  max_position_embeddingsgh㈵>rms_norm_epsT	use_cachei[P pad_token_idi)Q bos_token_idi*Q eos_token_idrope_parametersFg?r   g{Gz?initializer_rangetie_word_embeddingsr    )%r!   r"   r#   r$   r%   r&   r'   keys_to_ignore_at_inferencedefault_thetar7   r(   r)   r   r8   r:   r   r<   r>   strr?   r@   r-   rA   r*   rB   rC   rD   r+   rE   r   dictmlp_biasattention_biasr   rF   rG   r.   r    r/   r0   r2   r2   L   s      #J#O#4"5MJK"s"s!!&'t'J#'S'L%ItL#L#+1L#S	/D(148O^d*T18HN%(us{(#u# %%r/   r2   c                      ^  \ rS rSr% SrSrS/r\\S.r	Sr
\\-  S-  \S'   Sr\\-  S-  \S'   Sr\\\4   S-  \S	'   S
r\\S'   U 4S jrSrU =r$ )
Emu3Configy   z
vocabulary_map (`dict`, *optional*):
    A dictionary containing the vocabulary map from the tokenizer. Used to obtain tokens from the image inputs.
emu3r6   )r5   r   Nr   r5   vocabulary_mapFrG   c                   > U R                   c  [        5       U l         O9[        U R                   [        5      (       a  [        S0 U R                   D6U l         U R                  c  [        5       U l        O9[        U R                  [        5      (       a  [        S0 U R                  D6U l        U R                  b  U R                  R                  S5      OS U l        [        TU ](  " S0 UD6  g )Nz<image>r    )r   r
   
isinstancerK   r5   r2   rR   getimage_token_idsuper__post_init__)selfkwargs	__class__s     r0   rX   Emu3Config.__post_init__   s    >>!,.DN--,>t~~>DN#-/D(($//-A0@0@ADDHDWDWDcd1155i@im''r/   )rV   r5   r   )r!   r"   r#   r$   r%   r&   rH   r2   r
   sub_configsr   rK   r)   r5   rR   rJ   r(   rG   r*   rX   r.   __classcell__)r[   s   @r0   rO   rO   y   sv    
 J#4"5"0OK/3Ito%,304K&-4,0NDcNT)0 %%( (r/   rO   )rO   r2   r
   N)huggingface_hub.dataclassesr   configuration_utilsr   modeling_rope_utilsr   utilsr   r
   r2   rO   __all__r    r/   r0   <module>rd      s   " / 3 1 # 89/)& /)  :/)d 89(&% (&  :(&V 89(! (  :(< >r/   